fix(android): NowPlaying go-to-album/artist navigates atomically (audit v3 Bug-5)
The kebab "Go to album/artist" did popBackStack() then navigate() —
two transactions, leaving a visible frame on whichever shell tab sat
under NowPlaying before the detail pushed. Replaced with a single
navigate(...) { popUpTo(NowPlaying) { inclusive = true } } so the
modal is removed and the detail pushed in one atomic transaction,
no intermediate frame.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,7 @@ import com.fabledsword.minstrel.nav.ArtistDetail
|
||||
import com.fabledsword.minstrel.nav.HERO_KEY_NOW_PLAYING_COVER
|
||||
import com.fabledsword.minstrel.nav.LocalAnimatedContentScope
|
||||
import com.fabledsword.minstrel.nav.LocalSharedTransitionScope
|
||||
import com.fabledsword.minstrel.nav.NowPlaying
|
||||
import com.fabledsword.minstrel.nav.Queue
|
||||
import com.fabledsword.minstrel.shared.widgets.LikeButton
|
||||
import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsButton
|
||||
@@ -293,13 +294,18 @@ private fun BottomActionsRow(
|
||||
TrackActionsButton(
|
||||
track = track,
|
||||
hideQueueActions = true,
|
||||
// Single atomic transaction — navigate to the detail while
|
||||
// popping NowPlaying off the back stack, so there's no
|
||||
// intermediate frame on the shell tab underneath (Bug-5).
|
||||
onNavigateToAlbum = { id ->
|
||||
navController.popBackStack()
|
||||
navController.navigate(AlbumDetail(id))
|
||||
navController.navigate(AlbumDetail(id)) {
|
||||
popUpTo(NowPlaying) { inclusive = true }
|
||||
}
|
||||
},
|
||||
onNavigateToArtist = { id ->
|
||||
navController.popBackStack()
|
||||
navController.navigate(ArtistDetail(id))
|
||||
navController.navigate(ArtistDetail(id)) {
|
||||
popUpTo(NowPlaying) { inclusive = true }
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user