hark-store: give %read-all fact

Fixes urbit/landscape#402
This commit is contained in:
Liam Fitzgerald 2021-02-16 11:23:13 +10:00
parent a4d717030d
commit 899ead25fb
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 9 additions and 2 deletions

View File

@ -661,8 +661,7 @@
unreads-each (~(run by unreads-each) _~)
notifications (~(run by notifications) _~)
==
=> rebuild-cache
seen
(give:seen:rebuild-cache %read-all ~)
::
++ set-dnd
|= d=?

View File

@ -112,6 +112,14 @@ function reduce(data: any, state: HarkState) {
unreadEach(data, state);
seenIndex(data, state);
removeGraph(data, state);
readAll(data, state);
}
function readAll(json: any, state: HarkState) {
const data = _.get(json, 'read-all');
if(data) {
clearState(state);
}
}
function removeGraph(json: any, state: HarkState) {