mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-06 23:16:29 +03:00
hark: new boxing refinement
This commit is contained in:
parent
55ad8e22ae
commit
4babfb22b7
@ -260,16 +260,14 @@
|
|||||||
^- update:store
|
^- update:store
|
||||||
:- %more
|
:- %more
|
||||||
^- (list update:store)
|
^- (list update:store)
|
||||||
:+ give-unreads
|
:~ give-unreads
|
||||||
[%set-dnd dnd]
|
[%set-dnd dnd]
|
||||||
give-notifications
|
give-notifications
|
||||||
|
==
|
||||||
::
|
::
|
||||||
++ give-notifications
|
++ give-notifications
|
||||||
^- (list update:store)
|
|
||||||
%+ turn ~(tap by unread-notes)
|
|
||||||
|= [=index:store =notification:store]
|
|
||||||
^- update:store
|
^- update:store
|
||||||
[%added index notification]
|
[%timebox ~ ~(tap by unread-notes)]
|
||||||
::
|
::
|
||||||
++ give-since-unreads
|
++ give-since-unreads
|
||||||
^- (list [stats-index:store stats:store])
|
^- (list [stats-index:store stats:store])
|
||||||
@ -322,8 +320,7 @@
|
|||||||
?:(is-archive archive notifications)
|
?:(is-archive archive notifications)
|
||||||
|= [time=@da =timebox:store]
|
|= [time=@da =timebox:store]
|
||||||
^- update:store
|
^- update:store
|
||||||
:^ %timebox time is-archive
|
[%timebox `time ~(tap by timebox)]
|
||||||
~(tap by timebox)
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-poke
|
++ on-poke
|
||||||
@ -550,7 +547,7 @@
|
|||||||
=. unreads-count (~(put by unreads-count) stats-index 0)
|
=. unreads-count (~(put by unreads-count) stats-index 0)
|
||||||
=/ times=(list index:store)
|
=/ times=(list index:store)
|
||||||
(unread-for-stats-index stats-index)
|
(unread-for-stats-index stats-index)
|
||||||
=? timeboxes !(~(has by timeboxes) stats-index) ~& 'new box' (~(put by timeboxes) stats-index now.bowl)
|
=? timeboxes !(~(has by timeboxes) stats-index) (~(put by timeboxes) stats-index now.bowl)
|
||||||
(give:(read-indices times) %read-count stats-index)
|
(give:(read-indices times) %read-count stats-index)
|
||||||
::
|
::
|
||||||
++ read-indices
|
++ read-indices
|
||||||
|
@ -502,11 +502,10 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ timebox
|
++ timebox
|
||||||
|= [tim=@da arch=? l=(list [^index ^notification])]
|
|= [tim=(unit @da) l=(list [^index ^notification])]
|
||||||
^- json
|
^- json
|
||||||
%- pairs
|
%- pairs
|
||||||
:~ time+s+(scot %ud tim)
|
:~ time+`json`?~(tim ~ s+(scot %ud u.tim))
|
||||||
archive+b+arch
|
|
||||||
:- %notifications
|
:- %notifications
|
||||||
^- json
|
^- json
|
||||||
:- %a
|
:- %a
|
||||||
|
@ -31,11 +31,12 @@
|
|||||||
::
|
::
|
||||||
+$ action
|
+$ action
|
||||||
$% [%add-note =index =notification]
|
$% [%add-note =index =notification]
|
||||||
[%archive time=(unit @da) index]
|
:: if .time is ~, then archiving unread notification
|
||||||
|
:: else, archiving read notification
|
||||||
|
[%archive time=(unit @da) =index]
|
||||||
::
|
::
|
||||||
[%unread-count =stats-index =time]
|
[%unread-count =stats-index =time]
|
||||||
[%read-count =stats-index]
|
[%read-count =stats-index]
|
||||||
::
|
|
||||||
::
|
::
|
||||||
[%unread-each =stats-index ref=index:graph-store time=@da]
|
[%unread-each =stats-index ref=index:graph-store time=@da]
|
||||||
[%read-each =stats-index ref=index:graph-store]
|
[%read-each =stats-index ref=index:graph-store]
|
||||||
@ -71,7 +72,7 @@
|
|||||||
[%more more=(list update)]
|
[%more more=(list update)]
|
||||||
[%added =index =notification]
|
[%added =index =notification]
|
||||||
[%note-read =time =index]
|
[%note-read =time =index]
|
||||||
[%timebox time=@da archived=? =(list [index notification])]
|
[%timebox time=(unit @da) =(list [index notification])]
|
||||||
[%count count=@ud]
|
[%count count=@ud]
|
||||||
[%clear =stats-index]
|
[%clear =stats-index]
|
||||||
[%unreads unreads=(list [stats-index stats])]
|
[%unreads unreads=(list [stats-index stats])]
|
||||||
|
Loading…
Reference in New Issue
Block a user