HomePhabricator
Diffusion Comm a384021d4934

[web][native] Reset the state iff current user ID changes

Description

[web][native] Reset the state iff current user ID changes

Summary:
We don't need to clear the state if the ID remains the same - it means that user-specific data can be still used. Every time the ID changes we have to clear the user specific data - it is safer to do that regardless of the action reduced.

In this approach we're reducing currentUserInfo twice - the reason is explained in code comments.

https://linear.app/comm/issue/ENG-7075/clear-redux-state-only-when-current-user-id-changes

Depends on D11532

Test Plan: Checked if the state is cleared after logging out.

Reviewers: kamil, inka, varun, ashoat

Reviewed By: inka, ashoat

Subscribers: ashoat

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

Details

Provenance
tomekAuthored on Mar 29 2024, 11:08 AM
Reviewer
inka
Differential Revision
D11533: [web][native] Reset the state iff current user ID changes
Parents
rCOMM30b805a54fd1: [web][native] Refactor reset state logic in reducers
Branches
Unknown
Tags
Unknown