Page MenuHomePhabricator

[lib/native] introduce useUpdateSystemTheme
ClosedPublic

Authored by ginsu on Oct 20 2023, 12:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 3:51 PM
Unknown Object (File)
Wed, Apr 24, 10:22 PM
Unknown Object (File)
Mon, Apr 22, 10:58 AM
Unknown Object (File)
Mon, Apr 22, 10:57 AM
Unknown Object (File)
Mon, Apr 22, 10:57 AM
Unknown Object (File)
Mon, Apr 22, 10:57 AM
Unknown Object (File)
Mon, Apr 22, 10:54 AM
Unknown Object (File)
Apr 8 2024, 7:56 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu added reviewers: atul, inka, rohan.
ginsu added inline comments.
native/themes/theme-handler.react.js
33 ↗(On Diff #32244)

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.