Page MenuHomePhabricator

[native] fix handling logout action
ClosedPublic

Authored by kamil on Nov 2 2023, 2:46 AM.
Tags
None
Referenced Files
F2832854: D9674.diff
Sat, Sep 28, 6:24 AM
Unknown Object (File)
Wed, Sep 18, 6:16 AM
Unknown Object (File)
Sun, Sep 15, 1:14 PM
Unknown Object (File)
Sun, Sep 15, 1:14 PM
Unknown Object (File)
Sun, Sep 15, 1:12 PM
Unknown Object (File)
Sun, Sep 15, 12:53 PM
Unknown Object (File)
Aug 27 2024, 1:27 PM
Unknown Object (File)
Aug 24 2024, 8:48 PM
Subscribers

Details

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.

Diff Detail

Repository
rCOMM Comm
Branch
fix-logout
Lint
No Lint Coverage
Unit
No Test Coverage