mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
hark-store: give stats facts for group notifications
Group notifications were being left out of the initial %unreads fact, which was causing faulty calculation of notification counts on the frontend Fixes urbit/landscape #276
This commit is contained in:
parent
fab9a47a92
commit
ac2c335bd2
@ -279,7 +279,6 @@
|
||||
%+ turn
|
||||
~(tap by unreads-count)
|
||||
|= [=stats-index:store count=@ud]
|
||||
?> ?=(%graph -.stats-index)
|
||||
:* stats-index
|
||||
~(wyt in (~(gut by by-index) stats-index ~))
|
||||
[%count count]
|
||||
@ -297,10 +296,27 @@
|
||||
(~(gut by last-seen) stats-index *time)
|
||||
==
|
||||
::
|
||||
++ give-group-unreads
|
||||
^- (list [stats-index:store stats:store])
|
||||
%+ murn ~(tap by by-index)
|
||||
|= [=stats-index:store nots=(set [time index:store])]
|
||||
?. ?=(%group -.stats-index)
|
||||
~
|
||||
:- ~
|
||||
:* stats-index
|
||||
~(wyt in nots)
|
||||
[%count 0]
|
||||
*time
|
||||
==
|
||||
::
|
||||
++ give-unreads
|
||||
^- update:store
|
||||
:- %unreads
|
||||
(weld give-each-unreads give-since-unreads)
|
||||
;: weld
|
||||
give-each-unreads
|
||||
give-since-unreads
|
||||
give-group-unreads
|
||||
==
|
||||
--
|
||||
::
|
||||
++ on-peek
|
||||
|
Loading…
Reference in New Issue
Block a user