Skip to content

Commit a6ad4a6

Browse files
committed
update import
1 parent f11d9ab commit a6ad4a6

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • packages/react-native/Libraries/Components/StatusBar

packages/react-native/Libraries/Components/StatusBar/StatusBar.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1212

1313
import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
14-
import {
15-
getColorScheme,
16-
addChangeListener as addColorSchemeChangeListener,
17-
} from '../../Utilities/Appearance';
14+
import * as Appearance from '../../Utilities/Appearance';
1815
import processColor from '../../StyleSheet/processColor';
1916
import Platform from '../../Utilities/Platform';
2017
import NativeStatusBarManagerAndroid from './NativeStatusBarManagerAndroid';
@@ -147,7 +144,9 @@ type StackProps = {
147144
* the current color scheme.
148145
*/
149146
function getAutoBarStyle(): 'light-content' | 'dark-content' {
150-
return getColorScheme() === 'dark' ? 'light-content' : 'dark-content';
147+
return Appearance.getColorScheme() === 'dark'
148+
? 'light-content'
149+
: 'dark-content';
151150
}
152151

153152
/**
@@ -444,7 +443,7 @@ class StatusBar extends React.Component<StatusBarProps> {
444443
if (StatusBar._mountedCount === 0) {
445444
// Re-run the native update when the system color scheme changes so any
446445
// `barStyle: 'auto'` entries resolve to the new appropriate value.
447-
StatusBar._appearanceSubscription = addColorSchemeChangeListener(() => {
446+
StatusBar._appearanceSubscription = Appearance.addChangeListener(() => {
448447
StatusBar._updatePropsStack();
449448
});
450449
}

0 commit comments

Comments
 (0)