Check ext lib version when checking for updates (#8740)

This commit is contained in:
Jays2Kings 2022-12-14 13:49:10 -05:00 committed by GitHub
parent 9dd9e741f3
commit 7608cb0da3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,8 +87,9 @@ internal class ExtensionGithubApi {
for (installedExt in installedExtensions) { for (installedExt in installedExtensions) {
val pkgName = installedExt.pkgName val pkgName = installedExt.pkgName
val availableExt = extensions.find { it.pkgName == pkgName } ?: continue val availableExt = extensions.find { it.pkgName == pkgName } ?: continue
val hasUpdatedVer = availableExt.versionCode > installedExt.versionCode
val hasUpdate = installedExt.isUnofficial.not() && (availableExt.versionCode > installedExt.versionCode) val hasUpdatedLib = availableExt.libVersion > installedExt.libVersion
val hasUpdate = installedExt.isUnofficial.not() && (hasUpdatedVer || hasUpdatedLib)
if (hasUpdate) { if (hasUpdate) {
extensionsWithUpdate.add(installedExt) extensionsWithUpdate.add(installedExt)
} }