diff --git a/desk/app/activity.hoon b/desk/app/activity.hoon index 24c7c566b3..89976d69d3 100644 --- a/desk/app/activity.hoon +++ b/desk/app/activity.hoon @@ -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 @@ -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 diff --git a/desk/tests/app/activity.hoon b/desk/tests/app/activity.hoon index 5c51a26262..d851c12d83 100644 --- a/desk/tests/app/activity.hoon +++ b/desk/tests/app/activity.hoon @@ -575,7 +575,7 @@ :~ :- (get-nest source.chnl) [d5 0 ~ ~] :- (get-nest source.bad-chnl-migration) - [d1 0 ~ ~] + [d0 0 ~ ~] == ++ chat-scry ^- unreads:ch @@ -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