mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 07:03:37 +03:00
hark-store: do not give all notifications in +on-watch
This commit is contained in:
parent
3b55404dee
commit
fa9a7dc0f0
@ -75,10 +75,12 @@
|
||||
[%count unread-count]
|
||||
%+ weld
|
||||
%+ turn
|
||||
(tap-nonempty archive)
|
||||
%+ scag 5
|
||||
(tap-nonempty:ha archive)
|
||||
(timebox-update &)
|
||||
%+ turn
|
||||
(tap-nonempty notifications)
|
||||
%+ scag 5
|
||||
(tap-nonempty:ha notifications)
|
||||
(timebox-update |)
|
||||
::
|
||||
++ timebox-update
|
||||
@ -86,12 +88,6 @@
|
||||
|= [time=@da =timebox:store]
|
||||
^- update:store
|
||||
[%timebox time archived ~(tap by timebox)]
|
||||
::
|
||||
++ tap-nonempty
|
||||
|= =notifications:store
|
||||
^- (list [@da timebox:store])
|
||||
%+ skip (tap:orm notifications)
|
||||
|=([@da =timebox:store] =(0 ~(wyt by timebox)))
|
||||
--
|
||||
::
|
||||
++ on-peek
|
||||
@ -104,11 +100,13 @@
|
||||
(slav %ud i.t.t.path)
|
||||
=/ length=@ud
|
||||
(slav %ud i.t.t.t.path)
|
||||
:^ ~ ~ %noun
|
||||
:^ ~ ~ %hark-update
|
||||
!> ^- update:store
|
||||
:- %more
|
||||
%+ turn
|
||||
(scag length (slag offset (tap:orm notifications)))
|
||||
%+ scag length
|
||||
%+ slag offset
|
||||
(tap-nonempty:ha notifications)
|
||||
|= [time=@da =timebox:store]
|
||||
^- update:store
|
||||
:^ %timebox time %.n
|
||||
@ -231,6 +229,12 @@
|
||||
|_ =bowl:gall
|
||||
+* met ~(. metadata bowl)
|
||||
::
|
||||
++ tap-nonempty
|
||||
|= =notifications:store
|
||||
^- (list [@da timebox:store])
|
||||
%+ skip (tap:orm notifications)
|
||||
|=([@da =timebox:store] =(0 ~(wyt by timebox)))
|
||||
::
|
||||
++ merge-notification
|
||||
|= [existing=notification:store new=notification:store]
|
||||
^- notification:store
|
||||
|
Loading…
Reference in New Issue
Block a user