You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reland: [iOS] [Fabric] Fixes crash of dynamic color when light/dark mode changed (#49265)
Summary:
Reland #48496 .
## Changelog:
[IOS] [FIXED] - Fabric: Fixes crash of dynamic color when light/dark mode changed
Pull Request resolved: #49265
Test Plan: RNTester -> PlatformColor example -> changed the dark/light mode in the system settings -> go back to App and pop and push the PlatformColor example, it would crash:
Reviewed By: javache
Differential Revision: D69309825
Pulled By: cipolleschi
fbshipit-source-id: 7a533a73ef343b071000388b653b2d1d0c54ae88
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,12 @@ struct Color {
24
24
Color(int32_t color);
25
25
Color(const DynamicColor& dynamicColor);
26
26
Color(const ColorComponents& components);
27
-
Color(std::shared_ptr<void> uiColor);
27
+
Color() : uiColor_(nullptr){};
28
28
int32_tgetColor() const;
29
+
int32_tgetUIColorHash() const;
30
+
31
+
static Color createSemanticColor(std::vector<std::string>& semanticItems);
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.h
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm
0 commit comments