mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-12 15:01:38 +03:00
hark-graph-hook: do not autowatch leaf nodes
This commit is contained in:
parent
e7de3533ee
commit
12bfae630b
@ -18,6 +18,9 @@
|
||||
watch-on-self=_&
|
||||
==
|
||||
::
|
||||
+$ notif-kind
|
||||
[name=@t parent-lent=@ud mode=?(%each %count) watch=?]
|
||||
::
|
||||
--
|
||||
::
|
||||
=| state-0
|
||||
@ -236,7 +239,7 @@
|
||||
^- (quip card _state)
|
||||
=^ child-cards state
|
||||
(check-node-children node tube)
|
||||
=+ !< notif-kind=(unit [name=@t parent-lent=@ud mode=?(%each %count)])
|
||||
=+ !< notif-kind=(unit notif-kind)
|
||||
(tube !>([0 post.node]))
|
||||
?~ notif-kind
|
||||
[child-cards state]
|
||||
@ -250,7 +253,7 @@
|
||||
[%graph group rid module.metadata desc parent]
|
||||
?: =(our.bowl author.post.node)
|
||||
=^ self-cards state
|
||||
(self-post node notif-index mode.u.notif-kind)
|
||||
(self-post node notif-index [mode watch]:u.notif-kind)
|
||||
:_ state
|
||||
(weld child-cards self-cards)
|
||||
:_ state
|
||||
@ -282,13 +285,14 @@
|
||||
|= $: =node:graph-store
|
||||
=index:store
|
||||
mode=?(%count %each)
|
||||
watch=?
|
||||
==
|
||||
^- (quip card _state)
|
||||
=| cards=(list card)
|
||||
=? cards ?=(%count mode)
|
||||
:_ cards
|
||||
(poke-hark %read-count index)
|
||||
?. ?=(%.y watch-on-self)
|
||||
?. &(watch watch-on-self)
|
||||
[cards state]
|
||||
:- cards
|
||||
state(watching (~(put in watching) [rid index.post.node]))
|
||||
|
@ -4,8 +4,9 @@
|
||||
|%
|
||||
++ noun i
|
||||
++ notification-kind
|
||||
::
|
||||
?+ index.p.i ~
|
||||
[@ ~] `[%message 0 %count]
|
||||
[@ ~] `[%message 0 %count %.n]
|
||||
==
|
||||
--
|
||||
++ grab
|
||||
|
@ -5,9 +5,9 @@
|
||||
++ noun i
|
||||
++ notification-kind
|
||||
?+ index.p.i ~
|
||||
[@ ~] `[%link 0 %each]
|
||||
[@ @ %1 ~] `[%comment 1 %count]
|
||||
[@ @ @ ~] `[%edit-comment 1 %count]
|
||||
[@ ~] `[%link 0 %each %.y]
|
||||
[@ @ %1 ~] `[%comment 1 %count %.n]
|
||||
[@ @ @ ~] `[%edit-comment 1 %count %.n]
|
||||
==
|
||||
--
|
||||
++ grab
|
||||
|
@ -8,10 +8,10 @@
|
||||
::
|
||||
++ notification-kind
|
||||
?+ index.p.i ~
|
||||
[@ %1 %1 ~] `[%note 0 %each]
|
||||
[@ %1 @ ~] `[%edit-note 0 %each]
|
||||
[@ %2 @ %1 ~] `[%comment 1 %count]
|
||||
[@ %2 @ @ ~] `[%edit-comment 1 %count]
|
||||
[@ %1 %1 ~] `[%note 0 %each %.n]
|
||||
[@ %1 @ ~] `[%edit-note 0 %each %.n]
|
||||
[@ %2 @ %1 ~] `[%comment 1 %count %.n]
|
||||
[@ %2 @ @ ~] `[%edit-comment 1 %count %.n]
|
||||
==
|
||||
--
|
||||
++ grab
|
||||
|
Loading…
Reference in New Issue
Block a user