From 79b41c6a1567526adaa0ca5faa578c8e73f2c639 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Thu, 24 Sep 2026 07:54:45 +0000 Subject: [PATCH] use one 200ms overlay duration --- app/src/main/kotlin/com/subtracks/ui/AppRoot.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt b/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt index 8a7aa073..35f35d3e 100644 --- a/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt +++ b/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt @@ -74,9 +74,8 @@ class RootViewModel( } private const val NAVIGATION_DURATION_MS = 260 -private const val NOW_PLAYING_DURATION_MS = 300 +private const val OVERLAY_DURATION_MS = 200 private const val EXPAND_FADE = 0.1f -private const val SETTLE_DURATION_MS = 200 private object Routes { const val LIBRARY = "library" @@ -121,7 +120,7 @@ private fun MainNavigation() { fun settleNowPlaying(open: Boolean) { val target = if (open) 1f else 0f scope.launch { - animate(nowPlayingProgress, target, animationSpec = tween(SETTLE_DURATION_MS)) { value, _ -> + animate(nowPlayingProgress, target, animationSpec = tween(OVERLAY_DURATION_MS)) { value, _ -> nowPlayingProgress = value } } @@ -288,8 +287,8 @@ private fun MainNavigation() { AnimatedVisibility( visible = showingQueue, - enter = slideInVertically(initialOffsetY = { it }) + fadeIn(tween(NOW_PLAYING_DURATION_MS)), - exit = slideOutVertically(targetOffsetY = { it }) + fadeOut(tween(NOW_PLAYING_DURATION_MS)), + enter = slideInVertically(initialOffsetY = { it }) + fadeIn(tween(OVERLAY_DURATION_MS)), + exit = slideOutVertically(targetOffsetY = { it }) + fadeOut(tween(OVERLAY_DURATION_MS)), ) { QueueRoute( onBack = { showingQueue = false },