diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-12-20 20:39:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-20 20:39:18 +0000 |
commit | f5a9ac13134f2e71e3d667b65e2fd98b41db6974 (patch) | |
tree | 6cf947296930be5aabb340f1d01b184f570b3e47 /src/view/com/lightbox/ImageViewing | |
parent | c5421596a8d449525a0436c6d686bb9c90bedffa (diff) | |
download | voidsky-f5a9ac13134f2e71e3d667b65e2fd98b41db6974.tar.zst |
fix lightbox on android 15 (#7221)
Diffstat (limited to 'src/view/com/lightbox/ImageViewing')
-rw-r--r-- | src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx | 8 | ||||
-rw-r--r-- | src/view/com/lightbox/ImageViewing/index.tsx | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx index 7a37c7e41..3089b6d3f 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx @@ -5,12 +5,8 @@ * LICENSE file in the root directory of this source tree. * */ -import { - SafeAreaView, - StyleSheet, - TouchableOpacity, - ViewStyle, -} from 'react-native' +import {StyleSheet, TouchableOpacity, ViewStyle} from 'react-native' +import {SafeAreaView} from 'react-native-safe-area-context' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx index f91acc12a..96f78a709 100644 --- a/src/view/com/lightbox/ImageViewing/index.tsx +++ b/src/view/com/lightbox/ImageViewing/index.tsx @@ -62,9 +62,9 @@ type Rect = {x: number; y: number; width: number; height: number} const PIXEL_RATIO = PixelRatio.get() const EDGES = - Platform.OS === 'android' + Platform.OS === 'android' && Platform.Version < 35 ? (['top', 'bottom', 'left', 'right'] satisfies Edge[]) - : (['left', 'right'] satisfies Edge[]) // iOS, so no top/bottom safe area + : (['left', 'right'] satisfies Edge[]) // iOS or Android 15+, so no top/bottom safe area const SLOW_SPRING: WithSpringConfig = { mass: isIOS ? 1.25 : 0.75, |