From 1f0b6d5a9c5eec0c5753a7be137f79b71fde2a6d Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 26 Mar 2021 08:11:53 +1000 Subject: [PATCH] notifications: clear before applying unreads Fixes urbit/landscape#646 --- pkg/interface/src/logic/reducers/hark-update.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/interface/src/logic/reducers/hark-update.ts b/pkg/interface/src/logic/reducers/hark-update.ts index b8e226d084..0ba83484ea 100644 --- a/pkg/interface/src/logic/reducers/hark-update.ts +++ b/pkg/interface/src/logic/reducers/hark-update.ts @@ -204,6 +204,7 @@ function unreadEach(json: any, state: HarkState): HarkState { function unreads(json: any, state: HarkState): HarkState { const data = _.get(json, 'unreads'); if(data) { + state = clearState(state); data.forEach(({ index, stats }) => { const { unreads, notifications, last } = stats; updateNotificationStats(state, index, 'last', () => last);