Optimize navigation back stack

Fix topjohnwu#4333

Co-authored-by: LoveSy <shana@zju.edu.cn>
This commit is contained in:
canyie
2022-01-20 17:13:16 +08:00
committed by John Wu
parent 1f5992f2c2
commit b0fba6ce5b
4 changed files with 9 additions and 8 deletions
@@ -84,9 +84,9 @@ class InstallViewModel(
fun install() {
when (method) {
R.id.method_patch -> FlashFragment.patch(data!!).navigate()
R.id.method_direct -> FlashFragment.flash(false).navigate()
R.id.method_inactive_slot -> FlashFragment.flash(true).navigate()
R.id.method_patch -> FlashFragment.patch(data!!).navigate(true)
R.id.method_direct -> FlashFragment.flash(false).navigate(true)
R.id.method_inactive_slot -> FlashFragment.flash(true).navigate(true)
else -> error("Unknown value")
}
state = State.LOADING