Skip to content

Commit

Permalink
safeAreaView: Ensure MainScreenWithTabs is aligned
Browse files Browse the repository at this point in the history
Makes sure our main tabs are aligned properly with the edges of the screen on iOS.

More about how safe areas work on iOS:
https://developer.apple.com/documentation/uikit/uiview/positioning_content_relative_to_the_safe_area

About the React Native-specific component:
https://facebook.github.io/react-native/docs/safeareaview
  • Loading branch information
borisyankov authored and gnprice committed Aug 9, 2019
1 parent 784da47 commit c073c05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/MainScreenWithTabs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow strict-local */
import React, { PureComponent } from 'react';
import { View } from 'react-native';
import { SafeAreaView } from 'react-native';

import type { Context } from '../types';
import { OfflineNotice, ZulipStatusBar } from '../common';
Expand All @@ -18,11 +18,11 @@ export default class MainScreenWithTabs extends PureComponent<{}> {
const { styles: contextStyles } = this.context;

return (
<View style={[styles.flexed, contextStyles.backgroundColor]}>
<SafeAreaView style={[styles.flexed, contextStyles.backgroundColor]}>
<ZulipStatusBar />
<OfflineNotice />
<MainTabs />
</View>
</SafeAreaView>
);
}
}

0 comments on commit c073c05

Please sign in to comment.