From 5e089451af41e3c5752680eeaa120cf5f88262b4 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Thu, 31 Oct 2019 20:53:37 +0100 Subject: [PATCH] Added loaders to superuser and hide --- .../magisk/redesign/hide/HideViewModel.kt | 1 + app/src/main/res/layout/fragment_hide_md2.xml | 56 ++++++++++++++----- .../res/layout/fragment_superuser_md2.xml | 46 +++++++++++---- 3 files changed, 78 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideViewModel.kt index f78cb65f0..15927cf7d 100644 --- a/app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideViewModel.kt @@ -47,6 +47,7 @@ class HideViewModel( .toList() .map { it.sort() } .map { it to items.calculateDiff(it) } + .applyViewModel(this) .subscribeK { items.update(it.first, it.second) query() diff --git a/app/src/main/res/layout/fragment_hide_md2.xml b/app/src/main/res/layout/fragment_hide_md2.xml index a3431b8ff..e9619e9c6 100644 --- a/app/src/main/res/layout/fragment_hide_md2.xml +++ b/app/src/main/res/layout/fragment_hide_md2.xml @@ -13,20 +13,48 @@ - + android:layout_height="match_parent"> + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_superuser_md2.xml b/app/src/main/res/layout/fragment_superuser_md2.xml index 99ca82e87..89f00bcd8 100644 --- a/app/src/main/res/layout/fragment_superuser_md2.xml +++ b/app/src/main/res/layout/fragment_superuser_md2.xml @@ -26,19 +26,19 @@ + android:orientation="vertical" + android:paddingTop="@dimen/l1"> + + + + + + + +