From b52eaa1826f0c7f4924cd8b0c74aefb4521bc3b6 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sun, 19 Jan 2025 11:23:34 +0000 Subject: [PATCH] keep content away from the bottom safe area --- src/screens/VideoFeed/components/Scrubber.tsx | 4 +- src/screens/VideoFeed/index.tsx | 85 +++++++++---------- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/src/screens/VideoFeed/components/Scrubber.tsx b/src/screens/VideoFeed/components/Scrubber.tsx index d2cbfa7aa0..12691e4d9c 100644 --- a/src/screens/VideoFeed/components/Scrubber.tsx +++ b/src/screens/VideoFeed/components/Scrubber.tsx @@ -191,12 +191,14 @@ export function Scrubber({ a.justify_end, a.py_lg, { - paddingBottom: insets.bottom + tokens.space.md, + paddingBottom: insets.bottom, + paddingTop: tokens.space.md, height: // bottom padding insets.bottom + // actual height tokens.space.xl + + // top padding tokens.space.md, }, a.z_10, diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index e53bec91d7..fc3af790b0 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -18,7 +18,6 @@ import Animated, { useSharedValue, } from 'react-native-reanimated' import { - SafeAreaView, useSafeAreaFrame, useSafeAreaInsets, } from 'react-native-safe-area-context' @@ -495,48 +494,46 @@ function VideoItem({ return ( - - {postShadow === POST_TOMBSTONE ? ( - + - - Post has been deleted - - - ) : ( - <> - - {player && ( - - )} - {moderation && ( - - )} - - )} - + Post has been deleted + + + ) : ( + <> + + {player && ( + + )} + {moderation && ( + + )} + + )} ) } @@ -550,6 +547,7 @@ function VideoItemInner({ embed: AppBskyEmbedVideo.View active: boolean }) { + const {bottom} = useSafeAreaInsets() const {status} = useEvent(player, 'statusChange', {status: player.status}) return ( @@ -559,7 +557,7 @@ function VideoItemInner({ accessible={false} style={[ a.absolute, - a.inset_0, + {top: 0, left: 0, right: 0, bottom}, isAndroid && status === 'loading' && {opacity: 0}, ]} player={player} @@ -914,6 +912,7 @@ function VideoItemPlaceholder({ style?: ImageStyle blur?: boolean }) { + const {bottom} = useSafeAreaInsets() const src = embed.thumbnail let contentFit = isTallAspectRatio(embed.aspectRatio) ? ('cover' as const) @@ -925,7 +924,7 @@ function VideoItemPlaceholder({