Commit f3327461 authored by Viktor De Pasquale's avatar Viktor De Pasquale

Fixed current version showing null when magisk is not installed

parent b2fa5b55
......@@ -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) }
......
......@@ -106,6 +106,7 @@
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/current_version"
gone="@{state == MagiskState.LOADING || currentVersion.length == 0}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxLines="1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment