Page MenuHomePhabricator

[lib/native] introduce useUpdateSystemTheme
ClosedPublic

Authored by ginsu on Oct 20 2023, 12:18 AM.
Tags
None
Referenced Files
F3332745: D9551.id32320.diff
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
Unknown Object (File)
Thu, Nov 14, 11:23 AM
Unknown Object (File)
Thu, Nov 14, 11:00 AM
Unknown Object (File)
Fri, Nov 8, 10:58 PM
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.