mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #842 from Bnyro/master
new version = null when checking version
This commit is contained in:
commit
9193c86e54
@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 7,
|
||||
"versionName": "0.2.5",
|
||||
"versionCode": 14,
|
||||
"versionName": "0.4.1",
|
||||
"outputFile": "app-x86_64-release.apk"
|
||||
},
|
||||
{
|
||||
@ -29,8 +29,8 @@
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 7,
|
||||
"versionName": "0.2.5",
|
||||
"versionCode": 14,
|
||||
"versionName": "0.4.1",
|
||||
"outputFile": "app-x86-release.apk"
|
||||
},
|
||||
{
|
||||
@ -42,8 +42,8 @@
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 7,
|
||||
"versionName": "0.2.5",
|
||||
"versionCode": 14,
|
||||
"versionName": "0.4.1",
|
||||
"outputFile": "app-armeabi-v7a-release.apk"
|
||||
},
|
||||
{
|
||||
@ -55,8 +55,8 @@
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 7,
|
||||
"versionName": "0.2.5",
|
||||
"versionCode": 14,
|
||||
"versionName": "0.4.1",
|
||||
"outputFile": "app-arm64-v8a-release.apk"
|
||||
}
|
||||
],
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.github.libretube.preferences
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.preference.Preference
|
||||
@ -86,9 +87,10 @@ class MainSettings : PreferenceFragmentCompat() {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
// check for update
|
||||
val updateInfo = UpdateChecker.getLatestReleaseInfo()
|
||||
if (updateInfo?.name != "" && BuildConfig.VERSION_NAME != updateInfo?.name) {
|
||||
Log.e(TAG, updateInfo?.name.toString())
|
||||
if (updateInfo?.name != null && BuildConfig.VERSION_NAME != updateInfo?.name) {
|
||||
// show the UpdateAvailableDialog if there's an update available
|
||||
val updateAvailableDialog = UpdateDialog(updateInfo!!)
|
||||
val updateAvailableDialog = UpdateDialog(updateInfo)
|
||||
updateAvailableDialog.show(childFragmentManager, "UpdateAvailableDialog")
|
||||
} else {
|
||||
// otherwise show the no update available snackBar
|
||||
|
Loading…
x
Reference in New Issue
Block a user