Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3156045
D10619.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10619.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10619: [lib] Refactor report store reducer
Attached
Detach File
Event Timeline
Log In to Comment