Page MenuHomePhabricator

[native] fix handling logout action
ClosedPublic

Authored by kamil on Nov 2 2023, 2:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 1:07 PM
Unknown Object (File)
Tue, Oct 22, 1:07 PM
Unknown Object (File)
Tue, Oct 22, 9:18 AM
Unknown Object (File)
Tue, Oct 22, 5:05 AM
Unknown Object (File)
Tue, Oct 15, 1:18 PM
Unknown Object (File)
Sat, Oct 12, 12:09 PM
Unknown Object (File)
Sep 28 2024, 6:24 AM
Unknown Object (File)
Sep 18 2024, 6:16 AM
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