mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
apps: resolve style comments about ?- vs ?:
This commit is contained in:
parent
b97b68024e
commit
81dcab8aa0
@ -894,15 +894,13 @@
|
||||
=/ =uid:post (snag index history)
|
||||
=/ =node:graph (got-node:libgraph uid)
|
||||
=. audience resource.uid
|
||||
?- -.post.node
|
||||
%| [~ state]
|
||||
%&
|
||||
:_ put-ses
|
||||
^- (list card)
|
||||
:~ (print:sh-out ['?' ' ' number])
|
||||
(effect:sh-out ~(render-activate mr resource.uid p.post.node))
|
||||
prompt:sh-out
|
||||
==
|
||||
?: ?=(%| -.post.node)
|
||||
[~ state]
|
||||
:_ put-ses
|
||||
^- (list card)
|
||||
:~ (print:sh-out ['?' ' ' number])
|
||||
(effect:sh-out ~(render-activate mr resource.uid p.post.node))
|
||||
prompt:sh-out
|
||||
==
|
||||
--
|
||||
:: +chats: display list of joined chats
|
||||
|
@ -300,29 +300,25 @@
|
||||
=/ parent-index=index:store
|
||||
(scag (dec (lent index)) index)
|
||||
?: (~(has by nodes) parent-index) %.y
|
||||
?- -.post.node
|
||||
%| %.n
|
||||
::
|
||||
%&
|
||||
?. =(author.p.post.node src.bowl)
|
||||
%.n
|
||||
=/ =permissions:store
|
||||
%^ add-mark resource vip
|
||||
(node-to-indexed-post node)
|
||||
=/ =permission-level:store
|
||||
(get-permission permissions is-admin writers)
|
||||
?- permission-level
|
||||
%yes %.y
|
||||
%no %.n
|
||||
::
|
||||
%self
|
||||
=/ parent-node=node:store
|
||||
(got-node:gra resource parent-index)
|
||||
?- -.post.parent-node
|
||||
%| %.n
|
||||
%& =(author.p.post.parent-node src.bowl)
|
||||
==
|
||||
==
|
||||
?: ?=(%| -.post.node)
|
||||
%.n
|
||||
?. =(author.p.post.node src.bowl)
|
||||
%.n
|
||||
=/ =permissions:store
|
||||
%^ add-mark resource vip
|
||||
(node-to-indexed-post node)
|
||||
=/ =permission-level:store
|
||||
(get-permission permissions is-admin writers)
|
||||
?- permission-level
|
||||
%yes %.y
|
||||
%no %.n
|
||||
::
|
||||
%self
|
||||
=/ parent-node=node:store
|
||||
(got-node:gra resource parent-index)
|
||||
?: ?=(%| -.post.parent-node)
|
||||
%.n
|
||||
=(author.p.post.parent-node src.bowl)
|
||||
==
|
||||
::
|
||||
++ is-allowed-remove
|
||||
@ -337,20 +333,16 @@
|
||||
^- ?
|
||||
=/ =node:store
|
||||
(got-node:gra resource index)
|
||||
?- -.post.node
|
||||
%| %.n
|
||||
::
|
||||
%&
|
||||
=/ =permissions:store
|
||||
%^ remove-mark resource vip
|
||||
(node-to-indexed-post node)
|
||||
=/ =permission-level:store
|
||||
(get-permission permissions is-admin writers)
|
||||
?- permission-level
|
||||
%yes %.y
|
||||
%no %.n
|
||||
%self =(author.p.post.node src.bowl)
|
||||
==
|
||||
?: ?=(%| -.post.node) %.n
|
||||
=/ =permissions:store
|
||||
%^ remove-mark resource vip
|
||||
(node-to-indexed-post node)
|
||||
=/ =permission-level:store
|
||||
(get-permission permissions is-admin writers)
|
||||
?- permission-level
|
||||
%yes %.y
|
||||
%no %.n
|
||||
%self =(author.p.post.node src.bowl)
|
||||
==
|
||||
::
|
||||
++ build-permissions
|
||||
|
@ -368,11 +368,11 @@
|
||||
=/ =node:store
|
||||
~| "cannot remove index that does not exist {<index>}"
|
||||
(need (get:orm graph atom))
|
||||
~| "cannot remove post that has already been removed"
|
||||
?> ?=(%& -.post.node)
|
||||
=* p p.post.node
|
||||
%= node
|
||||
%_ node
|
||||
post
|
||||
~| "cannot remove post that has already been removed"
|
||||
?> ?=(%& -.post.node)
|
||||
=* p p.post.node
|
||||
^- maybe-post:store
|
||||
:- %|
|
||||
?~ hash.p
|
||||
|
Loading…
Reference in New Issue
Block a user