mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40: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) {
|
when (navController.currentDestination?.id) {
|
||||||
moveTaskToBack(true)
|
startFragmentId -> {
|
||||||
} else {
|
moveTaskToBack(true)
|
||||||
navController.popBackStack(R.id.searchResultFragment, false) ||
|
}
|
||||||
|
R.id.searchResultFragment -> {
|
||||||
navController.popBackStack(R.id.searchFragment, true) ||
|
navController.popBackStack(R.id.searchFragment, true) ||
|
||||||
|
navController.popBackStack()
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
navController.popBackStack()
|
navController.popBackStack()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user