From f21b04af4917f623c4c5a745a5b75b30811f26c6 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Thu, 24 Sep 2026 08:24:04 +0000 Subject: [PATCH] dismiss the now playing overlay when playback is cleared --- app/src/main/kotlin/com/subtracks/ui/AppRoot.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt b/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt index 7a9d9b70..b1251001 100644 --- a/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt +++ b/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt @@ -136,6 +136,13 @@ private fun MainNavigation() { LaunchedEffect(Unit) { if (nowPlayingOpen) nowPlayingProgress = 1f } val playerVisible = playback.item != null + LaunchedEffect(playerVisible) { + if (!playerVisible) { + settleJob?.cancel() + nowPlayingOpen = false + nowPlayingProgress = 0f + } + } val density = LocalDensity.current val navBarInset = with(density) { WindowInsets.navigationBars.getBottom(this).toDp() }