Merge pull request #4906 from urbit/lf/opt-unread

hark: optimistic read
This commit is contained in:
matildepark 2021-05-16 23:05:38 -04:00 committed by GitHub
commit e5514b1386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,15 +80,15 @@ export class HarkApi extends BaseApi<StoreState> {
} }
markCountAsRead(association: Association, parent: string, description: GraphNotifDescription) { markCountAsRead(association: Association, parent: string, description: GraphNotifDescription) {
return this.harkAction( const action = { 'read-count': {
{ 'read-count': {
graph: { graph: {
graph: association.resource, graph: association.resource,
group: association.group, group: association.group,
description, description,
index: parent index: parent
} } } }
}); };
doOptimistically(useHarkState, action, this.harkAction.bind(this), [reduce]);
} }
markEachAsRead(association: Association, parent: string, child: string, description: GraphNotifDescription, mod: string) { markEachAsRead(association: Association, parent: string, child: string, description: GraphNotifDescription, mod: string) {