From f3fec6ac74ef13d2821104f8499dff0d0c08827c Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 22 Oct 2020 11:30:18 +1000 Subject: [PATCH] hark-group-hook: address review comments --- pkg/arvo/app/hark-group-hook.hoon | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/arvo/app/hark-group-hook.hoon b/pkg/arvo/app/hark-group-hook.hoon index 97690748a6..8919a38d86 100644 --- a/pkg/arvo/app/hark-group-hook.hoon +++ b/pkg/arvo/app/hark-group-hook.hoon @@ -40,9 +40,8 @@ ++ on-load |= old=vase ^- (quip card _this) - :_ this(state !<(state-0 old)) - ~ - :: + `this(state !<(state-0 old)) +:: ++ on-watch on-watch:def :: ++ on-poke @@ -118,7 +117,7 @@ =/ =index:store [%group resource.update -.update] :_ state - ~[(add-unread:ha index notification)] + ~[(add-unread index notification)] :: +metadata-update is stubbed for now, for the following reasons :: - There's no semantic difference in metadata-store between :: adding and editing a channel @@ -128,6 +127,12 @@ |= update=metadata-update:metadata-store ^- (quip card _state) [~ state] + :: + ++ add-unread + |= [=index:store =notification:store] + ^- card + =- [%pass / %agent [our.bowl %hark-store] %poke -] + hark-action+!>([%add index notification]) -- :: ++ on-peek on-peek:def @@ -139,11 +144,6 @@ |_ =bowl:gall +* met ~(. metadata bowl) :: -++ add-unread - |= [=index:store =notification:store] - ^- card - [%pass / %agent [our.bowl %hark-store] %poke %hark-action !>([%add index notification])] -:: ++ watch-groups ^- card [%pass /group %agent [our.bowl %group-store] %watch /groups]