mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fixes Appearance user interface style when app run from background (#46021)
Summary: Fixes https://github.com/facebook/react-native/issues/46015. ## Changelog: [IOS] [FIXED] - Fixes Appearance user interface style when app run from background Pull Request resolved: https://github.com/facebook/react-native/pull/46021 Test Plan: Demo in https://github.com/facebook/react-native/issues/46015. Reviewed By: christophpurrer Differential Revision: D61536857 Pulled By: cipolleschi fbshipit-source-id: ee06cb25b5fc4fa72d646efe212738e54b9ef858
This commit is contained in:
committed by
Facebook GitHub Bot
parent
52888c0c1e
commit
efa9711e35
@@ -70,8 +70,13 @@ NSString *RCTColorSchemePreference(UITraitCollection *traitCollection)
|
||||
return appearances[@(traitCollection.userInterfaceStyle)];
|
||||
}
|
||||
|
||||
if (!traitCollection) {
|
||||
traitCollection = [UITraitCollection currentTraitCollection];
|
||||
}
|
||||
|
||||
UIUserInterfaceStyle systemStyle = sUseKeyWindowForSystemStyle ? RCTKeyWindow().traitCollection.userInterfaceStyle
|
||||
: traitCollection.userInterfaceStyle;
|
||||
|
||||
return appearances[@(systemStyle)] ?: RCTAppearanceColorSchemeLight;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user