Page MenuHomePhabricator

[native] Introduce theme reducer to reset theme on log out
ClosedPublic

Authored by ashoat on May 19 2023, 11:57 AM.
Tags
None
Referenced Files
F1662760: D7891.diff
Thu, Apr 25, 6:32 AM
Unknown Object (File)
Mon, Apr 22, 11:18 AM
Unknown Object (File)
Mon, Apr 22, 11:18 AM
Unknown Object (File)
Mon, Apr 22, 11:15 AM
Unknown Object (File)
Tue, Apr 2, 6:20 PM
Unknown Object (File)
Thu, Mar 28, 8:01 PM
Unknown Object (File)
Feb 24 2024, 12:22 AM
Unknown Object (File)
Feb 23 2024, 11:57 PM
Subscribers

Details

Summary

I noticed that if the user sets a light theme, then logs out, and then enters the new registration flow, it will present itself in light mode.

We aren't prepared to handle a light mode registration flow. Perhaps the most complicated part is that we load a web view for Ethereum log in, and to support light mode there would require substantial work, including some way to communicate to the web view that we are in light mode.

Instead of adding support for light mode, this diff makes sure that we always reset the theme configuration on log out. (It also resets it on log in, to follow existing conventions in the codebase; for an example, see lib/reducers/services-access-token-reducer.js.)

Depends on D7888

Test Plan

Set light mode, then log out and enter the new registration flow. It should show in dark mode

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/redux/redux-setup.js
256

I have to keep this return here so that we don't call masterReducer with an action that it doesn't support. masterReducer only supports the shared actions in lib, but updateThemeInfoActionType is native-specific.

This revision is now accepted and ready to land.May 19 2023, 12:35 PM