re-register the overlay back callback when the overlay state changes

On the library no navigation happens, so ours was registered before the NavHost's and
lost; keying the DisposableEffect on the overlay flags re-adds it last as soon as the
overlay opens.
This commit is contained in:
austinried
2026-10-04 00:29:58 +00:00
parent ad5660381f
commit d28c6c77dd
@@ -393,7 +393,7 @@ private fun MainNavigation() {
SideEffect {
backCallback.isEnabled = showingQueue || nowPlayingOpen || navController.previousBackStackEntry != null
}
DisposableEffect(backDispatcher, currentRoute) {
DisposableEffect(backDispatcher, currentRoute, showingQueue, nowPlayingOpen) {
backDispatcher?.addCallback(backCallback)
onDispose { backCallback.remove() }
}