mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
Merge branch 'lf/neg-notifications'
This commit is contained in:
commit
491c1b4698
@ -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
|
||||
|
@ -233,8 +233,8 @@ function updateNotificationStats(state: HarkState, index: NotifIndex, statField:
|
||||
const curr = _.get(state.unreads.graph, [index.graph.graph, index.graph.index, statField], 0);
|
||||
_.set(state.unreads.graph, [index.graph.graph, index.graph.index, statField], f(curr));
|
||||
} else if('group' in index) {
|
||||
const curr = _.get(state.unreads.group, [index.group.group, statField], 0);
|
||||
_.set(state.unreads.group, [index.group.group, statField], f(curr));
|
||||
const curr = _.get(state.unreads.group, [index.group, statField], 0);
|
||||
_.set(state.unreads.group, [index.group, statField], f(curr));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user