mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
dismiss the now playing overlay when playback is cleared
This commit is contained in:
@@ -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() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user