Merge pull request #5387 from urbit/lf/hark-publish-fix

hark-graph-hook: correctly get rear of index
This commit is contained in:
Liam Fitzgerald 2021-11-03 12:23:52 -05:00 committed by GitHub
commit 7369c3570a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -61,6 +61,9 @@ export function Note(props: NoteProps & RouteComponentProps) {
const noteId = bigInt(index[1]);
useEffect(() => {
airlock.poke(markEachAsRead(toHarkPlace(association.resource), `/${index[1]}`));
// Unread may be malformed, dismiss anyway
// TODO: remove when %read-graph is implemented
airlock.poke(markEachAsRead(toHarkPlace(association.resource), `/1`));
}, [association, props.note]);
const adminLinks: JSX.Element[] = [];

View File

@ -486,7 +486,7 @@
update-core
?- mode.kind
%count (hark %unread-count place %.y 1)
%each (hark %unread-each place /(rsh 4 (scot %ui (rear index.post))))
%each (hark %unread-each place /(rsh 4 (scot %ui (rear self-idx))))
%none update-core
==
==
@ -497,7 +497,7 @@
update-core
?- mode.kind
%count (hark %unread-count place %.n 1)
%each (hark %read-each place /(rsh 4 (scot %ui (rear index.post))))
%each (hark %read-each place /(rsh 4 (scot %ui (rear self-idx))))
%none update-core
==
==