Skip to content

Commit cebf3da

Browse files
satya164Trancever
authored andcommitted
fix: don't set statusbar style in Appbar.Header (#1873)
1 parent 47d7a21 commit cebf3da

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/components/Appbar/AppbarHeader.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ import {
55
View,
66
SafeAreaView,
77
ViewStyle,
8-
StatusBar,
98
} from 'react-native';
109
import overlay from '../../styles/overlay';
1110
import Appbar, { DEFAULT_APPBAR_HEIGHT } from './Appbar';
1211
import shadow from '../../styles/shadow';
1312
import { withTheme } from '../../core/theming';
1413
import { Theme } from '../../types';
1514
import { APPROX_STATUSBAR_HEIGHT } from '../../constants';
16-
import color from 'color';
1715

1816
type Props = React.ComponentProps<typeof Appbar> & {
1917
/**
@@ -110,16 +108,6 @@ class AppbarHeader extends React.Component<Props> {
110108
// Let the user override the behaviour
111109
const Wrapper =
112110
typeof this.props.statusBarHeight === 'number' ? View : SafeAreaView;
113-
let isDark;
114-
if (typeof dark === 'boolean') {
115-
isDark = dark;
116-
} else {
117-
isDark =
118-
backgroundColor === 'transparent'
119-
? false
120-
: !color(backgroundColor).isLight();
121-
}
122-
StatusBar.setBarStyle(isDark ? 'light-content' : 'dark-content');
123111

124112
return (
125113
<Wrapper

0 commit comments

Comments
 (0)