diff --git a/native/chat/message-result.react.js b/native/chat/message-result.react.js --- a/native/chat/message-result.react.js +++ b/native/chat/message-result.react.js @@ -29,6 +29,7 @@ | NavigationRoute<'MessageResultsScreen'> | NavigationRoute<'MessageSearch'>, +messageVerticalBounds: ?VerticalBounds, + +scrollable: boolean, }; function MessageResult(props: MessageResultProps): React.Node { @@ -41,8 +42,16 @@ [props.item], ); + const containerStyle = React.useMemo( + () => + props.scrollable + ? [styles.container, styles.containerOverflow] + : styles.container, + [props.scrollable, styles.container, styles.containerOverflow], + ); + return ( - <ScrollView style={styles.container}> + <ScrollView style={containerStyle}> <MessageListContextProvider threadInfo={props.threadInfo}> <View style={styles.viewContainer}> <Message @@ -67,6 +76,8 @@ container: { marginTop: 5, backgroundColor: 'panelForeground', + }, + containerOverflow: { overflow: 'scroll', maxHeight: 400, }, diff --git a/native/chat/message-results-screen.react.js b/native/chat/message-results-screen.react.js --- a/native/chat/message-results-screen.react.js +++ b/native/chat/message-results-screen.react.js @@ -153,6 +153,7 @@ navigation={navigation} route={route} messageVerticalBounds={messageVerticalBounds} + scrollable={false} /> ); }), diff --git a/native/chat/toggle-pin-modal.react.js b/native/chat/toggle-pin-modal.react.js --- a/native/chat/toggle-pin-modal.react.js +++ b/native/chat/toggle-pin-modal.react.js @@ -102,6 +102,7 @@ navigation={navigation} route={route} messageVerticalBounds={null} + scrollable={true} /> <View style={styles.buttonsContainer}> <Button style={modalInfo.buttonStyle} onPress={onPress}> diff --git a/native/search/message-search.react.js b/native/search/message-search.react.js --- a/native/search/message-search.react.js +++ b/native/search/message-search.react.js @@ -161,6 +161,7 @@ navigation={props.navigation} route={props.route} messageVerticalBounds={messageVerticalBounds} + scrollable={false} /> ); },