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( ...@@ -129,9 +129,13 @@ class HomeViewModel(
else -> MagiskState.UP_TO_DATE else -> MagiskState.UP_TO_DATE
} }
magiskCurrentVersion.value = version if (magiskState.value != MagiskState.NOT_INSTALLED) {
.format(Config.magiskVersionString, Config.magiskVersionCode) magiskCurrentVersion.value = version
.let { current.format(it) } .format(Config.magiskVersionString, Config.magiskVersionCode)
.let { current.format(it) }
} else {
magiskCurrentVersion.value = ""
}
magiskLatestVersion.value = version magiskLatestVersion.value = version
.format(Config.remoteMagiskVersionString, Config.remoteMagiskVersionCode) .format(Config.remoteMagiskVersionString, Config.remoteMagiskVersionCode)
.let { latest.format(it) } .let { latest.format(it) }
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/current_version" android:id="@+id/current_version"
gone="@{state == MagiskState.LOADING || currentVersion.length == 0}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" 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