Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3350245
D10795.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D10795.diff
View Options
diff --git a/lib/reducers/data-loaded-reducer.js b/lib/reducers/data-loaded-reducer.js
--- a/lib/reducers/data-loaded-reducer.js
+++ b/lib/reducers/data-loaded-reducer.js
@@ -9,6 +9,7 @@
} from '../actions/user-actions.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
import type { BaseAction } from '../types/redux-types.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
export default function reduceDataLoaded(
@@ -22,7 +23,8 @@
} else if (
action.type === setNewSessionActionType &&
action.payload.sessionChange.currentUserInfo &&
- action.payload.sessionChange.currentUserInfo.anonymous
+ action.payload.sessionChange.currentUserInfo.anonymous &&
+ !usingCommServicesAccessToken
) {
return false;
} else if (
diff --git a/lib/reducers/services-access-token-reducer.js b/lib/reducers/services-access-token-reducer.js
--- a/lib/reducers/services-access-token-reducer.js
+++ b/lib/reducers/services-access-token-reducer.js
@@ -7,6 +7,7 @@
} from '../actions/user-actions.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
import type { BaseAction } from '../types/redux-types.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
export default function reduceServicesAccessToken(
state: ?string,
@@ -17,7 +18,8 @@
} else if (
action.type === setNewSessionActionType &&
action.payload.sessionChange.currentUserInfo &&
- action.payload.sessionChange.currentUserInfo.anonymous
+ action.payload.sessionChange.currentUserInfo.anonymous &&
+ !usingCommServicesAccessToken
) {
return null;
} else if (
diff --git a/lib/reducers/theme-reducer.js b/lib/reducers/theme-reducer.js
--- a/lib/reducers/theme-reducer.js
+++ b/lib/reducers/theme-reducer.js
@@ -15,6 +15,7 @@
defaultGlobalThemeInfo,
type GlobalThemeInfo,
} from '../types/theme-types.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
export default function reduceGlobalThemeInfo(
state: GlobalThemeInfo,
@@ -30,7 +31,8 @@
} else if (
action.type === setNewSessionActionType &&
action.payload.sessionChange.currentUserInfo &&
- action.payload.sessionChange.currentUserInfo.anonymous
+ action.payload.sessionChange.currentUserInfo.anonymous &&
+ !usingCommServicesAccessToken
) {
return defaultGlobalThemeInfo;
} else if (
diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js
--- a/lib/reducers/user-reducer.js
+++ b/lib/reducers/user-reducer.js
@@ -48,6 +48,7 @@
import { getMessageForException } from '../utils/errors.js';
import { assertObjectsAreEqual } from '../utils/objects.js';
import { usingCommServicesAccessToken } from '../utils/services-utils.js';
+import { ashoatKeyserverID } from '../utils/validation-utils.js';
function reduceCurrentUserInfo(
state: ?CurrentUserInfo,
@@ -65,7 +66,8 @@
}
} else if (
action.type === setNewSessionActionType &&
- action.payload.sessionChange.currentUserInfo
+ action.payload.sessionChange.currentUserInfo &&
+ action.payload.keyserverID === ashoatKeyserverID
) {
const { sessionChange } = action.payload;
if (!_isEqual(sessionChange.currentUserInfo)(state)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 9:32 PM (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572502
Default Alt Text
D10795.diff (3 KB)
Attached To
Mode
D10795: [lib] Stop reducing data loaded, CSAT, theme and user info on set new session
Attached
Detach File
Event Timeline
Log In to Comment