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