mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 12:37:39 +00:00
Fixed loading showing in incorrect view-states
This commit is contained in:
parent
0f140b408c
commit
b744bb0a5a
@ -122,9 +122,8 @@ class ModuleViewModel(
|
|||||||
moveToState()
|
moveToState()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun loadRemoteImplicit() = downloadRepos()
|
fun loadRemoteImplicit() = let { items.clear(); itemsSearch.clear() }
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.run { downloadRepos() }
|
||||||
.doOnComplete { items.clear(); itemsSearch.clear() }
|
|
||||||
.applyViewModel(this, false)
|
.applyViewModel(this, false)
|
||||||
.subscribeK { refresh(); submitQuery() }
|
.subscribeK { refresh(); submitQuery() }
|
||||||
.add()
|
.add()
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
adapter="@{viewModel.adapter}"
|
adapter="@{viewModel.adapter}"
|
||||||
dividerHorizontal="@{R.drawable.divider_l1}"
|
dividerHorizontal="@{R.drawable.divider_l1}"
|
||||||
dividerVertical="@{R.drawable.divider_l1}"
|
dividerVertical="@{R.drawable.divider_l1}"
|
||||||
gone="@{viewModel.loading}"
|
gone="@{viewModel.loading && viewModel.items.empty}"
|
||||||
itemBinding="@{viewModel.itemBinding}"
|
itemBinding="@{viewModel.itemBinding}"
|
||||||
items="@{viewModel.items}"
|
items="@{viewModel.items}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -71,7 +71,7 @@
|
|||||||
</com.google.android.material.circularreveal.cardview.CircularRevealCardView>
|
</com.google.android.material.circularreveal.cardview.CircularRevealCardView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
goneUnless="@{viewModel.loading}"
|
goneUnless="@{viewModel.loading && viewModel.items.empty}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user