mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 05:22:27 +03:00
group-hook: on-load, re-establish subscriptions
For every item in the synced map that doesn't have a matching outgoing subscription, re-establish the subscription we expect to have.
This commit is contained in:
parent
ea48161334
commit
22bb2a0d86
@ -34,7 +34,22 @@
|
||||
++ on-save !>(state)
|
||||
++ on-load
|
||||
|= old=vase
|
||||
`this(state !<(state-zero old))
|
||||
^- (quip card _this)
|
||||
:_ this(state !<(state-zero old))
|
||||
%+ murn
|
||||
~(tap by synced)
|
||||
|= [=path =ship]
|
||||
^- (unit card)
|
||||
=/ =wire
|
||||
[(scot %p ship) %group path]
|
||||
=/ =term
|
||||
?: =(our.bowl ship)
|
||||
%group-store
|
||||
%group-hook
|
||||
?: (~(has by wex.bowl) [wire ship term])
|
||||
~
|
||||
`[%pass wire %agent [ship term] %watch [%group path]]
|
||||
::
|
||||
++ on-leave on-leave:def
|
||||
++ on-peek on-peek:def
|
||||
++ on-arvo on-arvo:def
|
||||
|
Loading…
Reference in New Issue
Block a user