Page MenuHomePhabricator

D4848.diff
No OneTemporary

D4848.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
Tue, Nov 26, 2:40 PM (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585143
Default Alt Text
D4848.diff (1 KB)

Event Timeline