From 067cb0cd9dfb5c0cb632c52f01848b0d7c251748 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Wed, 23 Oct 2019 16:20:01 +0200 Subject: [PATCH] Fixed magisk button states --- .../com/topjohnwu/magisk/redesign/home/HomeViewModel.kt | 9 +++------ app/src/main/res/layout/fragment_home_md2.xml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt index c244b3a3c..26adc56dd 100644 --- a/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt @@ -140,15 +140,12 @@ class HomeViewModel( fun onManagerPressed() = ManagerInstallDialog().publish() fun onMagiskPressed() { - //pre-fix so user doesn't click twice accidentally - stateMagiskProgress.value = 1 - withPermissions( Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE - ).map { check(it);it }.subscribeK(onError = { - stateManagerProgress.value = 0 - }) { + ).map { check(it);it }.subscribeK { + //pre-fix so user doesn't click twice accidentally + stateMagiskProgress.value = 1 DownloadService(get()) { subject = Magisk(Configuration.Download) } diff --git a/app/src/main/res/layout/fragment_home_md2.xml b/app/src/main/res/layout/fragment_home_md2.xml index 918bd1074..7f795f294 100644 --- a/app/src/main/res/layout/fragment_home_md2.xml +++ b/app/src/main/res/layout/fragment_home_md2.xml @@ -118,7 +118,7 @@