Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33304062
D14241.1768785652.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14241.1768785652.diff
View Options
diff --git a/native/media/camera-modal.react.js b/native/media/camera-modal.react.js
--- a/native/media/camera-modal.react.js
+++ b/native/media/camera-modal.react.js
@@ -31,7 +31,10 @@
interpolate,
Extrapolate,
} from 'react-native-reanimated';
-import { SafeAreaView } from 'react-native-safe-area-context';
+import {
+ SafeAreaView,
+ useSafeAreaInsets,
+} from 'react-native-safe-area-context';
import { pathFromURI, filenameFromPathOrURI } from 'lib/media/file-utils.js';
import { useIsAppForegrounded } from 'lib/shared/lifecycle-utils.js';
@@ -591,6 +594,8 @@
});
}, [flashButtonDimensions]);
+ const insets = useSafeAreaInsets();
+
const outsideButtons = React.useCallback(
(x: number, y: number) => {
'worklet';
@@ -598,8 +603,8 @@
return (
x < dim.x ||
x > dim.x + dim.width ||
- y < dim.y ||
- y > dim.y + dim.height
+ y + insets.top < dim.y ||
+ y + insets.top > dim.y + dim.height
);
};
const isOutsideCloseButton = isOutsideButton(
@@ -623,10 +628,11 @@
);
},
[
- closeButtonDimensions,
- flashButtonDimensions,
- photoButtonDimensions,
- switchCameraButtonDimensions,
+ closeButtonDimensions.value,
+ flashButtonDimensions.value,
+ insets.top,
+ photoButtonDimensions.value,
+ switchCameraButtonDimensions.value,
],
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 1:20 AM (15 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5953770
Default Alt Text
D14241.1768785652.diff (1 KB)
Attached To
Mode
D14241: [native] Fix focus animation on devices with top notches in CameraModal
Attached
Detach File
Event Timeline
Log In to Comment