Skip to content

Commit

Permalink
fix: don't set statusbar style in Appbar.Header (#1873)
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed May 5, 2020
1 parent d58968c commit eb8c36e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/components/Appbar/AppbarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import {
View,
SafeAreaView,
ViewStyle,
StatusBar,
} from 'react-native';
import overlay from '../../styles/overlay';
import Appbar, { DEFAULT_APPBAR_HEIGHT } from './Appbar';
import shadow from '../../styles/shadow';
import { withTheme } from '../../core/theming';
import { Theme } from '../../types';
import { APPROX_STATUSBAR_HEIGHT } from '../../constants';
import color from 'color';

type Props = React.ComponentProps<typeof Appbar> & {
/**
Expand Down Expand Up @@ -110,16 +108,6 @@ class AppbarHeader extends React.Component<Props> {
// Let the user override the behaviour
const Wrapper =
typeof this.props.statusBarHeight === 'number' ? View : SafeAreaView;
let isDark;
if (typeof dark === 'boolean') {
isDark = dark;
} else {
isDark =
backgroundColor === 'transparent'
? false
: !color(backgroundColor).isLight();
}
StatusBar.setBarStyle(isDark ? 'light-content' : 'dark-content');

return (
<Wrapper
Expand Down

0 comments on commit eb8c36e

Please sign in to comment.