Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3246741
D8262.id27907.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8262.id27907.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8262: [native] Prevent nested scroll in the message results screen
Attached
Detach File
Event Timeline
Log In to Comment