HomePhabricator
Diffusion Comm 9b4ddf86786d

[lib] Reset globalThemeInfo and dataLoaded on identity login

Tags
None
Referenced Files
F1022949: image.png
Jan 10 2024, 3:43 AM
File Not Attached
Subscribers
None

Description

[lib] Reset globalThemeInfo and dataLoaded on identity login

Summary:
issue: ENG-5823
We don't want to change those values on keyserver login, but we do want to change them on identity login

Test Plan:
Dispatched the action, checked that globalThemeInfo and dataLoaded get updated
Tested with combination of setting currentUserInfo on this action, as is supposed to happen. The reason is that dataLoaded is used to hide / show the logged out screen, using this function:

const isLoggedIn = (state: BaseAppState<>): boolean =>
  !!(
    state.currentUserInfo &&
    !state.currentUserInfo.anonymous &&
    state.dataLoaded
  );

The app looked like this if no keyserver was yet connected:

image.png (1×2 px, 112 KB)

The app works, it's possible to go to settings ans for example log out. We might want to update the UI some day, but it's imporatant that the user can see that they are logged in if they managed to log in to identity, and be able to log out.
Some discussion on this is in ENG-4211

Reviewers: michal, kamil, ginsu, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10508

Details

Provenance
inkaAuthored on Jan 3 2024, 3:53 AM
Reviewer
ashoat
Differential Revision
D10508: [lib] Reset globalThemeInfo and dataLoaded on identity login
Parents
rCOMM0188feaae1cf: [lib] Reduce new login actions in reduceEntryInfos and reduceKeyserverStore
Branches
Unknown
Tags
Unknown