Skip to content

Commit

Permalink
Merge pull request #3802 from tloncorp/hm/init-again
Browse files Browse the repository at this point in the history
activity: fix init again
  • Loading branch information
arthyn authored Jul 27, 2024
2 parents ffbb3e0 + db6ef4d commit 5937233
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions desk/app/activity.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,8 @@
index
?~ channel=(~(get by unreads) nest.source) index
?. &(=(count.u.channel 0) =(~ unread.u.channel)) index
index(floor.reads recency.u.channel)
?~ last=(ram:on-event:a stream.index) index
index(floor.reads -.u.last)
++ fix-dm-init-unreads
|= [=indices:a =unreads:ch]
^- indices:a
Expand All @@ -858,14 +859,10 @@
?=([[* [[%dm-invite *] *]] ~ ~] stream.index)
==
index
=/ whom
?- -.whom.source
%ship whom.source
%club whom.source
==
?~ dm=(~(get by unreads) whom.source) index
?. &(=(count.u.dm 0) =(~ unread.u.dm)) index
index(floor.reads recency.u.dm)
?~ last=(ram:on-event:a stream.index) index
index(floor.reads -.u.last)
:: previously we used items as a way to track individual reads because
:: floors were not local, but we have reverted to local floors and not
:: tracking individual reads
Expand Down
4 changes: 2 additions & 2 deletions desk/tests/app/activity.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@
:~ :- (get-nest source.chnl)
[d5 0 ~ ~]
:- (get-nest source.bad-chnl-migration)
[d1 0 ~ ~]
[d0 0 ~ ~]
==
++ chat-scry
^- unreads:ch
Expand All @@ -586,7 +586,7 @@
:- (get-whom source.unread-dm)
[d3 2 `[[[~rus d2] d2] 2] ~]
:- (get-whom source.bad-dm-migration)
[d1 0 ~ ~]
[d0 0 ~ ~]
==
++ get-nest
|= =source:a
Expand Down

0 comments on commit 5937233

Please sign in to comment.