mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Fix multiple backstack entries get removed on some fragments
This commit is contained in:
parent
3661660dd1
commit
5f5eee3be2
@ -143,12 +143,17 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
if (navController.currentDestination?.id == startFragmentId) {
|
||||
moveTaskToBack(true)
|
||||
} else {
|
||||
navController.popBackStack(R.id.searchResultFragment, false) ||
|
||||
when (navController.currentDestination?.id) {
|
||||
startFragmentId -> {
|
||||
moveTaskToBack(true)
|
||||
}
|
||||
R.id.searchResultFragment -> {
|
||||
navController.popBackStack(R.id.searchFragment, true) ||
|
||||
navController.popBackStack()
|
||||
}
|
||||
else -> {
|
||||
navController.popBackStack()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user