From 6b0854749f94027f5a57e979d1495307308d7a39 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Mon, 30 Mar 2020 16:17:33 +0200 Subject: [PATCH] Added setting resetting state on install screen It will additionally show that download is complete rather than being stuck on loading. --- .../magisk/ui/install/InstallViewModel.kt | 3 +- .../main/res/layout/fragment_install_md2.xml | 29 +++++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt index 5dfd530ed..221260efc 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt @@ -39,8 +39,7 @@ class InstallViewModel : BaseViewModel(State.LOADED) { } this.progress.value = progress.times(100).roundToInt() if (this.progress.value >= 100) { - // this might cause issues if the flash activity launches on top of this sooner - // back() + state = State.LOADED } } method.addOnPropertyChangedCallback { diff --git a/app/src/main/res/layout/fragment_install_md2.xml b/app/src/main/res/layout/fragment_install_md2.xml index c295b9018..14febbd86 100644 --- a/app/src/main/res/layout/fragment_install_md2.xml +++ b/app/src/main/res/layout/fragment_install_md2.xml @@ -25,7 +25,7 @@ android:layout_height="wrap_content"> + android:paddingEnd="3dp"> + android:checkedButton="@={viewModel.method}" + android:paddingStart="3dp" + android:paddingEnd="3dp"> + + + + + +