Skip to content

Commit

Permalink
Merge pull request #3682 from tloncorp/hm/improve-combined-count
Browse files Browse the repository at this point in the history
activity: refine combined count for channels
  • Loading branch information
arthyn authored Jun 27, 2024
2 parents be3e7d4 + 9c71bc4 commit 192f520
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions desk/app/activity.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
=? old ?=(%2 -.old) (state-2-to-3 old)
?> ?=(%3 -.old)
=. state old
cor
refresh-all-summaries
+$ versioned-state $%(state-3 state-2 state-1)
+$ state-3 current-state
+$ state-2
Expand Down Expand Up @@ -899,7 +899,12 @@
notify-count (^add notify-count.sum notify-count.as)
==
=/ newest=time :(max newest.cs floor.reads top)
=/ total count.cs
=/ total
:: if we're a channel, we only want thread notify counts, not totals
::
?: ?=(%channel -.source)
notify-count.cs
count.cs
=/ notify-count notify-count.cs
=/ main 0
=/ notified=? notify.cs
Expand Down

0 comments on commit 192f520

Please sign in to comment.