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: #3700
  • Loading branch information
im-adithya committed Apr 2, 2021
1 parent 1836c09 commit 3cd6768
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} fadingEdgeLength={50}>
{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 3cd6768

Please sign in to comment.