HomePhabricator
Diffusion Comm 7bc50e51996e

[native] fix handling logout action

Description

[native] fix handling logout action

Summary:
Fix for a regression introduced in D9010.

The problem was that the previous code returned immediately which means baseReducer wasn't able to properly modify the state.

Not a huge fan of this solution but I saw this somewhere in the codebase. As an alternative, I can suggest:

  1. Creating a separate reducer and running it in the same place - don't think is much better, will require the same assignment.
  2. Creating separate reduce and moving this to lib.

Only 2 seem better than this, but don't want to put native-specific data in lib.

Test Plan: Using Redux DevTools make sure that logout is handled and data that needs to be cleared is cleared/set default where it needs to be.

Reviewers: ginsu, michal, tomek

Reviewed By: tomek

Subscribers: ashoat, wyilio

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

Details

Provenance
kamilAuthored on Nov 2 2023, 2:45 AM
Reviewer
tomek
Differential Revision
D9674: [native] fix handling logout action
Parents
rCOMM445632bf1545: [lib] Introduce `decodeRolePermissionBitmask`
Branches
Unknown
Tags
Unknown