Page MenuHomePhabricator

D4848.id15713.diff
No OneTemporary

D4848.id15713.diff

diff --git a/lib/reducers/enabled-apps-reducer.js b/lib/reducers/enabled-apps-reducer.js
--- a/lib/reducers/enabled-apps-reducer.js
+++ b/lib/reducers/enabled-apps-reducer.js
@@ -1,7 +1,16 @@
// @flow
+import {
+ deleteAccountActionTypes,
+ logOutActionTypes,
+} from '../actions/user-actions.js';
import type { EnabledApps } from '../types/enabled-apps';
+import {
+ defaultEnabledApps,
+ defaultWebEnabledApps,
+} from '../types/enabled-apps';
import type { BaseAction } from '../types/redux-types';
+import { setNewSessionActionType } from '../utils/action-utils.js';
export const enableAppActionType = 'ENABLE_APP';
export const disableAppActionType = 'DISABLE_APP';
@@ -17,6 +26,13 @@
action.payload === 'calendar'
) {
return { ...state, calendar: false };
+ } else if (
+ action.type === logOutActionTypes.success ||
+ action.type === deleteAccountActionTypes.success ||
+ (action.type === setNewSessionActionType &&
+ action.payload.sessionChange.cookieInvalidated)
+ ) {
+ return process.env.BROWSER ? defaultWebEnabledApps : defaultEnabledApps;
}
return state;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 11:27 AM (17 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2451878
Default Alt Text
D4848.id15713.diff (1 KB)

Event Timeline