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
Unknown Object (File)
Mon, Nov 25, 4:08 PM
Unknown Object (File)
Mon, Nov 25, 10:38 AM
Unknown Object (File)
Fri, Nov 22, 2:31 AM
Unknown Object (File)
Thu, Nov 14, 11:25 AM
Unknown Object (File)
Thu, Nov 14, 11:25 AM
Unknown Object (File)
Thu, Nov 14, 11:23 AM
Unknown Object (File)
Thu, Nov 14, 11:00 AM
Unknown Object (File)
Oct 21 2024, 5:34 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/redux/redux-setup.js
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