diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js --- a/web/redux/redux-setup.js +++ b/web/redux/redux-setup.js @@ -14,6 +14,10 @@ type ReplaceKeyserverOperation, keyserverStoreOpsHandlers, } from 'lib/ops/keyserver-store-ops.js'; +import { + type ReplaceThreadActivityEntryOperation, + threadActivityStoreOpsHandlers, +} from 'lib/ops/thread-activity-store-ops.js'; import { type ThreadStoreOperation, threadStoreOpsHandlers, @@ -484,16 +488,33 @@ state.messageStore.threads[activeThread] ) { const now = Date.now(); - state = { - ...state, - threadActivityStore: { - ...state.threadActivityStore, - [(activeThread: string)]: { - ...state.threadActivityStore[activeThread], + const replaceOperation: ReplaceThreadActivityEntryOperation = { + type: 'replace_thread_activity_entry', + payload: { + id: activeThread, + threadActivityStoreEntry: { + ...state[activeThread], lastNavigatedTo: now, }, }, }; + + state = { + ...state, + threadActivityStore: + threadActivityStoreOpsHandlers.processStoreOperations( + state.threadActivityStore, + [replaceOperation], + ), + }; + + storeOperations = { + ...storeOperations, + threadActivityStoreOperations: [ + ...storeOperations.threadActivityStoreOperations, + replaceOperation, + ], + }; } if (updateActiveThreadOps.length > 0) {