ui: mitigate navigation desync bug
This thing reared it's ugly head again during 3.2.0 testing. I think I've found a terrible but probably functional workaround for it. Start using it.
This commit is contained in:
parent
449ec7cecd
commit
f400aa513c
1 changed files with 8 additions and 0 deletions
|
@ -148,6 +148,14 @@ class MainFragment :
|
|||
}
|
||||
}
|
||||
|
||||
// Workaround for a bug where fast navigation ends up desynchronizing the current
|
||||
// destination in the main navigation graph.
|
||||
findNavController().apply {
|
||||
findDestination(R.id.main_fragment)?.let {
|
||||
currentBackStackEntry?.destination = it
|
||||
}
|
||||
}
|
||||
|
||||
// --- VIEWMODEL SETUP ---
|
||||
collectImmediately(detailModel.editedPlaylist, detailBackCallback::invalidateEnabled)
|
||||
collectImmediately(homeModel.showOuter.flow, ::handleShowOuter)
|
||||
|
|
Loading…
Reference in a new issue