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