Page MenuHomePhabricator

D10619.diff
No OneTemporary

D10619.diff

diff --git a/lib/reducers/report-store-reducer.js b/lib/reducers/report-store-reducer.js
--- a/lib/reducers/report-store-reducer.js
+++ b/lib/reducers/report-store-reducer.js
@@ -9,7 +9,7 @@
import { siweAuthActionTypes } from '../actions/siwe-actions.js';
import {
logOutActionTypes,
- deleteKeyserverAccountActionTypes,
+ deleteAccountActionTypes,
logInActionTypes,
} from '../actions/user-actions.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
@@ -29,6 +29,7 @@
} from '../types/report-types.js';
import { isDev } from '../utils/dev-utils.js';
import { isReportEnabled } from '../utils/report-utils.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
export const updateReportsEnabledActionType = 'UPDATE_REPORTS_ENABLED';
@@ -75,9 +76,21 @@
};
} else if (
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success ||
- (action.type === setNewSessionActionType &&
- action.payload.sessionChange.cookieInvalidated)
+ action.type === deleteAccountActionTypes.success
+ ) {
+ return {
+ reportStore: {
+ queuedReports: [],
+ enabledReports: isDev
+ ? defaultDevEnabledReports
+ : defaultEnabledReports,
+ },
+ reportStoreOperations: [{ type: 'remove_all_reports' }],
+ };
+ } else if (
+ action.type === setNewSessionActionType &&
+ action.payload.sessionChange.cookieInvalidated &&
+ !usingCommServicesAccessToken
) {
return {
reportStore: {

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 1:24 PM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2430999
Default Alt Text
D10619.diff (1 KB)

Event Timeline