From ed7a2e7390f5288564d5185e7ebc4a5057b7ae9d Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 26 Sep 2026 03:11:15 +0000 Subject: [PATCH] stop the now playing title flickering on every track change The title effect was keyed on both the queue context and the per-track fallback (album name), so advancing a track reset the resolved playlist/album name to the album fallback until the async lookup returned. Key only on the queue context; `remember(queueContext)` already resets it synchronously when the context changes. --- .../kotlin/com/subtracks/ui/playback/NowPlayingScreen.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/playback/NowPlayingScreen.kt b/app/src/main/kotlin/com/subtracks/ui/playback/NowPlayingScreen.kt index cd1d0823..d1b936e1 100644 --- a/app/src/main/kotlin/com/subtracks/ui/playback/NowPlayingScreen.kt +++ b/app/src/main/kotlin/com/subtracks/ui/playback/NowPlayingScreen.kt @@ -92,9 +92,8 @@ fun NowPlayingRoute( } else { state.item?.album?.takeIf { it.isNotBlank() } ?: "Library" } - val sourceTitle = remember(queueContext, fallbackTitle) { mutableStateOf(fallbackTitle) } - LaunchedEffect(queueContext, fallbackTitle) { - sourceTitle.value = fallbackTitle + val sourceTitle = remember(queueContext) { mutableStateOf(fallbackTitle) } + LaunchedEffect(queueContext) { sourceTitle.value = controller.sourceTitle(queueContext)?.takeIf { it.isNotBlank() } ?: fallbackTitle } LaunchedEffect(state.item?.id, state.hasNext) {