fix updates

This commit is contained in:
CherretGit
2026-03-14 23:43:37 +07:00
parent f9b223d4e2
commit 09cdb53791

View File

@@ -82,10 +82,12 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) {
if (prefs.getBoolean("auto_update", BuildConfig.auto_update)) {
getUpdate(prefs)
.onSuccess { updateData ->
downloadUrl.value = updateData.updateInfo.downloadUrl
changeLog.value = updateData.changelog
newVersion.value = updateData.updateInfo.version
updateAvailable.value = true
if (updateData.updateInfo.versionCode > BuildConfig.VERSION_CODE) {
downloadUrl.value = updateData.updateInfo.downloadUrl
changeLog.value = updateData.changelog
newVersion.value = updateData.updateInfo.version
updateAvailable.value = true
}
}
.onFailure { exception ->
_errorFlow.value = exception.toString()