Changeset View
Changeset View
Standalone View
Standalone View
native/redux/redux-setup.js
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | if (state.messageStore.threads[threadID]) { | ||||
{ | { | ||||
type: 'replace_threads', | type: 'replace_threads', | ||||
payload: { | payload: { | ||||
threads: updatedThreads, | threads: updatedThreads, | ||||
}, | }, | ||||
}, | }, | ||||
], | ], | ||||
threadStoreOperations: [], | threadStoreOperations: [], | ||||
reportStoreOperations: [], | |||||
}); | }); | ||||
} | } | ||||
return state; | return state; | ||||
} | } | ||||
if (action.type === setNewSessionActionType) { | if (action.type === setNewSessionActionType) { | ||||
sessionInvalidationAlert(action.payload); | sessionInvalidationAlert(action.payload); | ||||
state = { | state = { | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | const threadStoreOperationsWithUnreadFix = [ | ||||
...threadStoreOperations, | ...threadStoreOperations, | ||||
...fixUnreadActiveThreadResult.threadStoreOperations, | ...fixUnreadActiveThreadResult.threadStoreOperations, | ||||
]; | ]; | ||||
processDBStoreOperations({ | processDBStoreOperations({ | ||||
draftStoreOperations, | draftStoreOperations, | ||||
messageStoreOperations, | messageStoreOperations, | ||||
threadStoreOperations: threadStoreOperationsWithUnreadFix, | threadStoreOperations: threadStoreOperationsWithUnreadFix, | ||||
reportStoreOperations: [], | |||||
}); | }); | ||||
return state; | return state; | ||||
} | } | ||||
function sessionInvalidationAlert(payload: SetSessionPayload) { | function sessionInvalidationAlert(payload: SetSessionPayload) { | ||||
if ( | if ( | ||||
!payload.sessionChange.cookieInvalidated || | !payload.sessionChange.cookieInvalidated || | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |