diff --git a/pkg/arvo/app/hark-graph-hook.hoon b/pkg/arvo/app/hark-graph-hook.hoon index a63610037..1fa2ae75a 100644 --- a/pkg/arvo/app/hark-graph-hook.hoon +++ b/pkg/arvo/app/hark-graph-hook.hoon @@ -159,7 +159,7 @@ [cards this] == ++ add-graph - |= [rid=resource =graph:graph-store] + |= rid=resource ^- (quip card _state) =/ group-rid=(unit resource) (group-from-app-resource:met %graph rid) @@ -172,14 +172,20 @@ |(is-hidden &(watch-on-self =(our.bowl entity.rid))) ?. should-watch `state - :- (give:ha ~[/updates] %listen [rid ~]) - state(watching (~(put in watching) [rid ~])) + =/ graph=graph:graph-store :: graph in subscription is bunted + (get-graph-mop:gra rid) + =/ node=(unit node:graph-store) + (bind (peek:orm:graph-store graph) |=([@ =node:graph-store] node)) + =^ cards state + (check-nodes (drop node) rid) + :_ state(watching (~(put in watching) [rid ~])) + (weld cards (give:ha ~[/updates] %listen [rid ~])) :: ++ graph-update |= =update:graph-store ^- (quip card _state) ?: ?=(%add-graph -.q.update) - (add-graph resource.q.update graph.q.update) + (add-graph resource.q.update) ?. ?=(%add-nodes -.q.update) [~ state] =* rid resource.q.update diff --git a/pkg/arvo/app/hark-store.hoon b/pkg/arvo/app/hark-store.hoon index f6a849b15..cadaa8438 100644 --- a/pkg/arvo/app/hark-store.hoon +++ b/pkg/arvo/app/hark-store.hoon @@ -198,15 +198,8 @@ ^- update:store :- %more ^- (list update:store) - :+ give-unreads - [%set-dnd dnd] - %+ weld - %+ turn - (tap-nonempty:ha archive) - (timebox-update &) - %+ turn - (tap-nonempty:ha notifications) - (timebox-update |) + :- give-unreads + [%set-dnd dnd]~ :: ++ give-since-unreads ^- (list [stats-index:store stats:store]) @@ -234,12 +227,6 @@ ^- update:store :- %unreads (weld give-each-unreads give-since-unreads) - :: - ++ timebox-update - |= archived=? - |= [time=@da =timebox:store] - ^- update:store - [%timebox time archived ~(tap by timebox)] -- :: ++ on-peek diff --git a/pkg/arvo/lib/graph.hoon b/pkg/arvo/lib/graph.hoon index 684474cdf..9c690a5e8 100644 --- a/pkg/arvo/lib/graph.hoon +++ b/pkg/arvo/lib/graph.hoon @@ -17,6 +17,15 @@ %+ scry-for update:store /graph/(scot %p entity.res)/[name.res] :: +++ get-graph-mop + |= res=resource + ^- graph:store + =/ =update:store + (get-graph res) + ?> ?=(%0 -.res) + ?> ?=(%add-graph -.q.update) + graph.q.update +:: ++ gut-younger-node-siblings |= [res=resource =index:store] ^- (map index:store node:store)