Page MenuHomePhabricator

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

Authored by ashoat on May 19 2023, 11:57 AM.
Referenced Files
Unknown Object (File)
Sat, May 18, 7:21 PM
Unknown Object (File)
Mon, May 6, 6:03 PM
Unknown Object (File)
Mon, May 6, 11:37 AM
Unknown Object (File)
Sun, Apr 28, 4:00 PM
Unknown Object (File)
Sun, Apr 28, 3:51 PM
Unknown Object (File)
Apr 25 2024, 6:32 AM
Unknown Object (File)
Apr 22 2024, 11:18 AM
Unknown Object (File)
Apr 22 2024, 11:18 AM



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

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

256 ↗(On Diff #26696)

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