notifications: update count on archive

This commit is contained in:
Liam Fitzgerald 2021-01-12 12:24:07 +10:00
parent ced3d7a079
commit b009104f8b
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -386,5 +386,7 @@ function archive(json: any, state: HarkState) {
notifIdxEqual(index, idxNotif.index)
);
state.notifications.set(time, unarchived);
const newlyRead = archived.filter(x => !x.notification.read).length;
updateNotificationStats(state, index, 'notifications', (x) => x - newlyRead);
}
}