Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3573382
D10647.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10647.diff
View Options
diff --git a/lib/reducers/calendar-filters-reducer.js b/lib/reducers/calendar-filters-reducer.js
--- a/lib/reducers/calendar-filters-reducer.js
+++ b/lib/reducers/calendar-filters-reducer.js
@@ -18,6 +18,7 @@
logInActionTypes,
tempIdentityLoginActionTypes,
keyserverRegisterActionTypes,
+ deleteAccountActionTypes,
} from '../actions/user-actions.js';
import { extractKeyserverIDFromID } from '../keyserver-conn/keyserver-call-utils.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
@@ -56,7 +57,7 @@
if (
action.type === tempIdentityLoginActionTypes.success ||
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success ||
+ action.type === deleteAccountActionTypes.success ||
action.type === logInActionTypes.success ||
action.type === siweAuthActionTypes.success ||
action.type === keyserverRegisterActionTypes.success ||
@@ -64,6 +65,11 @@
action.payload.sessionChange.cookieInvalidated)
) {
return defaultCalendarFilters;
+ } else if (action.type === deleteKeyserverAccountActionTypes.success) {
+ return removeKeyserverThreadIDsFromFilterList(
+ state,
+ action.payload.keyserverIDs,
+ );
} else if (action.type === keyserverAuthActionTypes.success) {
const keyserverIDs = Object.keys(action.payload.updatesCurrentAsOf);
return removeKeyserverThreadIDsFromFilterList(state, keyserverIDs);
diff --git a/lib/reducers/calendar-query-reducer.js b/lib/reducers/calendar-query-reducer.js
--- a/lib/reducers/calendar-query-reducer.js
+++ b/lib/reducers/calendar-query-reducer.js
@@ -1,5 +1,6 @@
// @flow
+import { removeKeyserverThreadIDsFromFilterList } from './calendar-filters-reducer.js';
import { updateCalendarQueryActionTypes } from '../actions/entry-actions.js';
import { siweAuthActionTypes } from '../actions/siwe-actions.js';
import {
@@ -7,6 +8,7 @@
deleteKeyserverAccountActionTypes,
logInActionTypes,
keyserverRegisterActionTypes,
+ deleteAccountActionTypes,
} from '../actions/user-actions.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
import { defaultCalendarQuery } from '../types/entry-types.js';
@@ -24,11 +26,19 @@
): CalendarQuery {
if (
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success ||
+ action.type === deleteAccountActionTypes.success ||
(action.type === setNewSessionActionType &&
action.payload.sessionChange.cookieInvalidated)
) {
return defaultCalendarQuery(getConfig().platformDetails.platform);
+ } else if (action.type === deleteKeyserverAccountActionTypes.success) {
+ return {
+ ...state,
+ filters: removeKeyserverThreadIDsFromFilterList(
+ state.filters,
+ action.payload.keyserverIDs,
+ ),
+ };
} else if (
action.type === logInActionTypes.success ||
action.type === siweAuthActionTypes.success
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 2:32 PM (3 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732683
Default Alt Text
D10647.diff (2 KB)
Attached To
Mode
D10647: [lib] Remove threads from calendar filters on logout
Attached
Detach File
Event Timeline
Log In to Comment