diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js --- a/lib/actions/user-actions.js +++ b/lib/actions/user-actions.js @@ -802,8 +802,6 @@ return { updates }; }; -const resetUserStateActionType = 'RESET_USER_STATE'; - const setAccessTokenActionType = 'SET_ACCESS_TOKEN'; export { @@ -838,7 +836,6 @@ policyAcknowledgmentActionTypes, updateUserAvatarActionTypes, updateUserAvatar, - resetUserStateActionType, setAccessTokenActionType, deleteAccountActionTypes, useDeleteAccount, diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js --- a/lib/reducers/keyserver-reducer.js +++ b/lib/reducers/keyserver-reducer.js @@ -21,7 +21,6 @@ deleteAccountActionTypes, keyserverRegisterActionTypes, logInActionTypes, - resetUserStateActionType, } from '../actions/user-actions.js'; import { extractKeyserverIDFromID } from '../keyserver-conn/keyserver-call-utils.js'; import { @@ -120,34 +119,6 @@ keyserverStore: processStoreOps(state, [removeOperation]), keyserverStoreOperations: [removeOperation], }; - } else if (action.type === resetUserStateActionType) { - // this action is only dispatched on native - const replaceOperations: ReplaceKeyserverOperation[] = []; - for (const keyserverID in state.keyserverInfos) { - const stateCookie = state.keyserverInfos[keyserverID]?.cookie; - if (stateCookie && stateCookie.startsWith('anonymous=')) { - continue; - } - replaceOperations.push({ - type: 'replace_keyserver', - payload: { - id: keyserverID, - keyserverInfo: { - ...state.keyserverInfos[keyserverID], - cookie: null, - connection: { - ...state.keyserverInfos[keyserverID].connection, - activeSessionRecovery: null, - }, - }, - }, - }); - } - - return { - keyserverStore: processStoreOps(state, replaceOperations), - keyserverStoreOperations: replaceOperations, - }; } else if (action.type === setNewSessionActionType) { const { keyserverID, sessionChange } = action.payload; const gotUserCookie = sessionChange.cookie?.startsWith('user='); diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js --- a/lib/reducers/user-reducer.js +++ b/lib/reducers/user-reducer.js @@ -19,7 +19,6 @@ keyserverRegisterActionTypes, setUserSettingsActionTypes, updateUserAvatarActionTypes, - resetUserStateActionType, } from '../actions/user-actions.js'; import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js'; import { @@ -158,8 +157,6 @@ }, }; } - } else if (action.type === resetUserStateActionType) { - state = state && state.anonymous ? state : null; } return state; }