Merge pull request 'fix(mobile): remove black screen during Android player dismissal' (#54) from t3/fix-player-swipe-black-screen into main

This commit was merged in pull request #54.
This commit is contained in:
joshuafhiggins committed 2026-11-01 17:31:04 -05:00
commit c3560f30fc
2 files changed
+10 -5

No files matched your search

+3 -4
View File
@@ -79,10 +79,9 @@ export default function AppLayout() {
name="player"
options={{
headerShown: false,
presentation:
Platform.OS === "ios"
? "transparentModal"
: "fullScreenModal",
// Keep the library visible behind the custom swipe animation.
presentation: "transparentModal",
contentStyle: { backgroundColor: "transparent" },
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
+7 -1
View File
@@ -92,6 +92,7 @@ export default function PlayerScreen() {
} = usePlayback()
const { volume, setVolume, available: volumeAvailable } = useSystemVolume()
const [showQueue, setShowQueue] = useState(false)
const [isDismissing, setIsDismissing] = useState(false)
const [stageHeight, setStageHeight] = useState(0)
const [scrubTime, setScrubTime] = useState<number | null>(null)
const user = useCachedQuery(api.auth.currentUser)
@@ -163,6 +164,7 @@ export default function PlayerScreen() {
event.translationY > DISMISS_DISTANCE ||
event.velocityY > DISMISS_VELOCITY
) {
scheduleOnRN(setIsDismissing, true)
dismissY.value = withTiming(
windowHeight,
{ duration: 220 },
@@ -222,7 +224,11 @@ export default function PlayerScreen() {
{Platform.OS === "android" ? (
<>
<Stack.Screen
options={{ statusBarStyle: colors.isDark ? "light" : "dark" }}
options={{
statusBarStyle: colors.isDark ? "light" : "dark",
// The swipe already animates the player offscreen.
animation: isDismissing ? "none" : "slide_from_bottom",
}}
/>
<NavigationBar style={colors.isDark ? "light" : "dark"} />
</>