RN-230 remove drawer bottom padding if only one team (#686)

This commit is contained in:
enahum 2017-06-28 09:50:50 -04:00 committed by Harrison Healey
parent 1b58bec9c4
commit 055e4173e8
2 changed files with 9 additions and 3 deletions

View file

@ -123,6 +123,7 @@ class ChannelsList extends Component {
const {searching, term} = this.state;
const teamMembers = Object.values(myTeamMembers);
const showMembers = teamMembers.length > 1;
const styles = getStyleSheet(theme);
let settings;
@ -176,7 +177,7 @@ class ChannelsList extends Component {
let badge;
let switcher;
if (teamMembers.length > 1 && !searching) {
if (showMembers && !searching) {
let mentionCount = 0;
let messageCount = 0;
teamMembers.forEach((m) => {
@ -227,7 +228,7 @@ class ChannelsList extends Component {
return (
<View
style={[styles.container, styles.extraPadding]}
style={[styles.container, showMembers ? styles.extraPadding : {}]}
>
<View style={styles.statusBar}>
<View style={styles.headerContainer}>

View file

@ -44,6 +44,11 @@ export default class SwiperIos extends PureComponent {
theme
} = this.props;
const pagination = {bottom: 0};
if (showTeams) {
pagination.bottom = 10;
}
return (
<Swiper
ref='swiper'
@ -51,7 +56,7 @@ export default class SwiperIos extends PureComponent {
loop={false}
index={1}
onMomentumScrollEnd={this.swiperPageSelected}
paginationStyle={{position: 'relative', bottom: 10}}
paginationStyle={[{position: 'relative'}, pagination]}
width={deviceWidth - openDrawerOffset}
height={deviceHeight}
style={{backgroundColor: theme.sidebarBg}}