Skip to content

Commit

Permalink
Navigation: Update nav to use ScrollView.
Browse files Browse the repository at this point in the history
Updates TitleGroup to use ScrollView instead
of View so that the avatars in nav bar don't
overflow and can be scrolled to view

Fixes zulip#3700
  • Loading branch information
im-adithya committed Mar 7, 2021
1 parent 82cde84 commit d96db73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/title/TitleGroup.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* @flow strict-local */

import React from 'react';
import { View } from 'react-native';
import { ScrollView, View } from 'react-native';

import type { UserId } from '../types';
import * as NavigationService from '../nav/NavigationService';
import styles, { createStyleSheet } from '../styles';
import { createStyleSheet } from '../styles';
import { UserAvatarWithPresenceById } from '../common/UserAvatarWithPresence';
import { navigateToAccountDetails } from '../nav/navActions';

Expand All @@ -22,7 +22,7 @@ const componentStyles = createStyleSheet({
export default function TitleGroup(props: Props) {
const { userIds } = props;
return (
<View style={styles.navWrapper}>
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
{userIds.map(userId => (
<View key={userId} style={componentStyles.titleAvatar}>
<UserAvatarWithPresenceById
Expand All @@ -34,6 +34,6 @@ export default function TitleGroup(props: Props) {
/>
</View>
))}
</View>
</ScrollView>
);
}

0 comments on commit d96db73

Please sign in to comment.