Page MenuHomePhabricator

D8262.id27907.diff
No OneTemporary

D8262.id27907.diff

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,19 @@
[props.item],
);
+ const containerStyle = React.useMemo(() => {
+ if (!props.scrollable) {
+ return styles.container;
+ }
+ return {
+ ...styles.container,
+ overflow: 'scroll',
+ maxHeight: 400,
+ };
+ }, [props.scrollable, styles.container]);
+
return (
- <ScrollView style={styles.container}>
+ <ScrollView style={containerStyle}>
<MessageListContextProvider threadInfo={props.threadInfo}>
<View style={styles.viewContainer}>
<Message
@@ -67,8 +79,6 @@
container: {
marginTop: 5,
backgroundColor: 'panelForeground',
- overflow: 'scroll',
- maxHeight: 400,
},
viewContainer: {
marginTop: 10,
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}
/>
);
},

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 1:44 AM (19 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2496031
Default Alt Text
D8262.id27907.diff (2 KB)

Event Timeline