Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3406633
D8271.id28642.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
D8271.id28642.diff
View Options
diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js
--- a/native/chat/chat-input-bar.react.js
+++ b/native/chat/chat-input-bar.react.js
@@ -111,6 +111,8 @@
activeThreadSelector,
} from '../navigation/nav-selectors.js';
import { NavContext } from '../navigation/navigation-context.js';
+import { OverlayContext } from '../navigation/overlay-context.js';
+import type { OverlayContextType } from '../navigation/overlay-context.js';
import {
type NavigationRoute,
ChatCameraModalRouteName,
@@ -170,6 +172,7 @@
text: string,
) => Promise<SendEditMessageResponse>,
+navigation: ?ChatNavigationProp<'MessageList'>,
+ +overlayContext: ?OverlayContextType,
};
type State = {
+text: string,
@@ -901,8 +904,12 @@
this.unblockNavigation();
navigation.dispatch(action);
};
+ const onContinueEditing = () => {
+ this.props.overlayContext?.resetScrollBlockingModalStatus();
+ };
exitEditAlert({
onDiscard: unblockAndDispatch,
+ onContinueEditing,
});
return 'ignore_action';
};
@@ -1197,6 +1204,7 @@
const navContext = React.useContext(NavContext);
const keyboardState = React.useContext(KeyboardContext);
const inputState = React.useContext(InputStateContext);
+ const overlayContext = React.useContext(OverlayContext);
const viewerID = useSelector(
state => state.currentUserInfo && state.currentUserInfo.id,
@@ -1276,6 +1284,7 @@
editedMessageInfo={editedMessageInfo}
editMessage={editMessage}
navigation={props.navigation}
+ overlayContext={overlayContext}
/>
);
}
diff --git a/native/navigation/overlay-context.js b/native/navigation/overlay-context.js
--- a/native/navigation/overlay-context.js
+++ b/native/navigation/overlay-context.js
@@ -17,6 +17,7 @@
}>,
+scrollBlockingModalStatus: ScrollBlockingModalStatus,
+setScrollBlockingModalStatus: ScrollBlockingModalStatus => void,
+ +resetScrollBlockingModalStatus: () => void,
};
const OverlayContext: React.Context<?OverlayContextType> =
React.createContext(null);
diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js
--- a/native/navigation/overlay-navigator.react.js
+++ b/native/navigation/overlay-navigator.react.js
@@ -157,6 +157,16 @@
};
const [scrollBlockingModalStatus, setScrollBlockingModalStatus] =
React.useState(() => getScrollBlockingModalStatus(scenes));
+
+ const resetScrollBlockingModalStatus = React.useCallback(() => {
+ if (!prevScenesRef.current) {
+ return;
+ }
+ setScrollBlockingModalStatus(
+ getScrollBlockingModalStatus(prevScenesRef.current),
+ );
+ }, []);
+
const sceneDataForNewScene = scene => ({
...scene,
context: {
@@ -164,6 +174,7 @@
visibleOverlays,
scrollBlockingModalStatus,
setScrollBlockingModalStatus,
+ resetScrollBlockingModalStatus,
},
ordering: {
...scene.ordering,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 5, 2:37 AM (14 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615659
Default Alt Text
D8271.id28642.diff (2 KB)
Attached To
Mode
D8271: [native] Unblock scrolling when continuing editing
Attached
Detach File
Event Timeline
Log In to Comment