Fixed current version showing null when magisk is not installed
This commit is contained in:
parent
b2fa5b551e
commit
f332746188
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user