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.
This commit is contained in:
austinried
2026-10-04 00:29:59 +00:00
parent da71bccb58
commit ed7a2e7390
@@ -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) {