diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
index 30142b4a6..ad92ab119 100644
--- a/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
+++ b/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
@@ -66,6 +66,8 @@ class HomeViewModel(
""
}
+ val hasRoot = KObservableField(false)
+
private var shownDialog = false
private val current = resources.getString(R.string.current_installed)
private val latest = resources.getString(R.string.latest_version)
@@ -110,6 +112,8 @@ class HomeViewModel(
Config.remoteMagiskVersionString = null
Config.remoteMagiskVersionCode = -1
+ hasRoot.value = Shell.rootAccess()
+
if (Networking.checkNetworkStatus(app)) {
CheckUpdates.check()
} else {
diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt b/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt
index abd21afb3..0d7488fbf 100644
--- a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt
+++ b/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt
@@ -5,7 +5,6 @@ import com.topjohnwu.magisk.BuildConfig
import com.topjohnwu.magisk.Config
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.model.events.*
-import com.topjohnwu.magisk.utils.Event
import com.topjohnwu.magisk.view.MarkDownWindow
import com.topjohnwu.magisk.view.dialogs.EnvFixDialog
import com.topjohnwu.magisk.view.dialogs.ManagerInstallDialog
@@ -125,14 +124,6 @@ class MagiskFragment : NewMagiskFragment
@@ -460,11 +464,13 @@