mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-12 14:03:37 +00:00
Added setting resetting state on install screen
It will additionally show that download is complete rather than being stuck on loading.
This commit is contained in:
parent
09ba4772b8
commit
6b0854749f
@ -39,8 +39,7 @@ class InstallViewModel : BaseViewModel(State.LOADED) {
|
|||||||
}
|
}
|
||||||
this.progress.value = progress.times(100).roundToInt()
|
this.progress.value = progress.times(100).roundToInt()
|
||||||
if (this.progress.value >= 100) {
|
if (this.progress.value >= 100) {
|
||||||
// this might cause issues if the flash activity launches on top of this sooner
|
state = State.LOADED
|
||||||
// back()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
method.addOnPropertyChangedCallback {
|
method.addOnPropertyChangedCallback {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
goneUnless="@{viewModel.loaded}"
|
goneUnless="@{viewModel.loaded && viewModel.progress <= 0}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
@ -91,9 +91,9 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
gone="@{viewModel.step != 0}"
|
gone="@{viewModel.step != 0}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:paddingEnd="3dp"
|
android:paddingEnd="3dp">
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/include_install_options"
|
layout="@layout/include_install_options"
|
||||||
@ -172,13 +172,13 @@
|
|||||||
gone="@{viewModel.step != 1}"
|
gone="@{viewModel.step != 1}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginTop="@dimen/l_50"
|
android:layout_marginTop="@dimen/l_50"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
android:layout_marginEnd="@dimen/l1"
|
||||||
android:layout_marginBottom="@dimen/l_50"
|
android:layout_marginBottom="@dimen/l_50"
|
||||||
android:checkedButton="@={viewModel.method}">
|
android:checkedButton="@={viewModel.method}"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingEnd="3dp">
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||||
android:id="@+id/method_download"
|
android:id="@+id/method_download"
|
||||||
@ -271,6 +271,23 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
goneUnless="@{viewModel.loaded && viewModel.progress >= 100}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/download_complete"
|
||||||
|
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user