mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
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:
@@ -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() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user