Page MenuHomePhabricator

[native] fix handling logout action
ClosedPublic

Authored by kamil on Nov 2 2023, 2:46 AM.
Tags
None
Referenced Files
F3368037: D9674.id32614.diff
Mon, Nov 25, 5:51 PM
F3363746: D9674.id.diff
Mon, Nov 25, 3:18 AM
Unknown Object (File)
Wed, Nov 20, 4:37 PM
Unknown Object (File)
Wed, Nov 20, 4:37 PM
Unknown Object (File)
Wed, Nov 20, 4:36 PM
Unknown Object (File)
Wed, Nov 20, 4:18 PM
Unknown Object (File)
Sat, Nov 16, 5:04 AM
Unknown Object (File)
Oct 22 2024, 1:07 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable