Page MenuHomePhabricator

[lib/native] introduce useUpdateSystemTheme
ClosedPublic

Authored by ginsu on Oct 20 2023, 12:18 AM.
Tags
None
Referenced Files
F3362312: D9551.id32244.diff
Sun, Nov 24, 10:05 PM
F3359456: D9551.diff
Sun, Nov 24, 9:16 AM
Unknown Object (File)
Thu, Nov 21, 9:06 PM
Unknown Object (File)
Thu, Nov 21, 1:18 AM
Unknown Object (File)
Thu, Nov 14, 10:41 PM
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:25 AM
Subscribers

Details

Summary

Now that we want to bring updateThemeInfo redux actions/state into web as well there are several things we should lift from native into lib so that we can share them across both platforms. This diff lifts the common logic in ThemeHandler into a hook that can be consumed by each respective platform's ThemeHandler

Part of https://linear.app/comm/issue/ENG-4956/lift-any-necessary-shared-types-selectors-functions-for-storing-the

Depends on D9550

Test Plan

flow and confirmed that the logic in updateSystemTheme still works as expected

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu added reviewers: atul, inka, rohan.
ginsu added inline comments.
native/themes/theme-handler.react.js
33

We need to use brackets for this callback to appease flow

Seems like straightforward move from native to lib

This revision is now accepted and ready to land.Oct 20 2023, 10:45 AM
This revision was landed with ongoing or failed builds.Oct 23 2023, 11:14 AM
This revision was automatically updated to reflect the committed changes.