fix(mobile): remove black screen during Android player dismissal

This commit is contained in:
joshuafhiggins committed 2026-10-30 14:23:56 -04:00 Verified
1 parent cd9972724f
commit 532210f4c5
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
@@ -91,6 +91,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)
@@ -162,6 +163,7 @@ export default function PlayerScreen() {
event.translationY > DISMISS_DISTANCE ||
event.velocityY > DISMISS_VELOCITY
) {
scheduleOnRN(setIsDismissing, true)
dismissY.value = withTiming(
windowHeight,
{ duration: 220 },
@@ -221,7 +223,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"} />
</>