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 ad92ab119..4eef9a973 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 @@ -129,9 +129,13 @@ class HomeViewModel( else -> MagiskState.UP_TO_DATE } - magiskCurrentVersion.value = version - .format(Config.magiskVersionString, Config.magiskVersionCode) - .let { current.format(it) } + if (magiskState.value != MagiskState.NOT_INSTALLED) { + magiskCurrentVersion.value = version + .format(Config.magiskVersionString, Config.magiskVersionCode) + .let { current.format(it) } + } else { + magiskCurrentVersion.value = "" + } magiskLatestVersion.value = version .format(Config.remoteMagiskVersionString, Config.remoteMagiskVersionCode) .let { latest.format(it) } diff --git a/app/src/main/res/layout/include_update_card.xml b/app/src/main/res/layout/include_update_card.xml index 68c7d9f3d..a337a0edf 100644 --- a/app/src/main/res/layout/include_update_card.xml +++ b/app/src/main/res/layout/include_update_card.xml @@ -106,6 +106,7 @@