fix: clear version on package fetch error

This commit is contained in:
Diamond 2022-11-06 06:25:07 -08:00
parent e03a528e0e
commit c8bbc2cd3d
No known key found for this signature in database
GPG key ID: DCBE5952BB3B6420

View file

@ -80,6 +80,7 @@ class HomeViewModel(
Log.e(BuildConfig.TAG, Log.getStackTraceString(t))
withContext(Dispatchers.Main) {
installedVersion = ""
installedVersionType = VersionType.ERROR
}
}
@ -95,6 +96,7 @@ class HomeViewModel(
supportedVersionType = VersionType.parseVersionCode(it.versionCode.toIntOrNull())
},
fail = {
supportedVersion = ""
supportedVersionType = VersionType.ERROR
}
)