mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Prevent unofficial exts from getting marked as obsolete or updateable (#7871)
* Prevent unofficial exts from getting marked as obsolete * Prevent unofficial ext `hasUpdate` getting marked as true
This commit is contained in:
parent
31b62b2779
commit
8d40e20b7d
2 changed files with 2 additions and 2 deletions
|
@ -184,7 +184,7 @@ class ExtensionManager(
|
||||||
val pkgName = installedExt.pkgName
|
val pkgName = installedExt.pkgName
|
||||||
val availableExt = availableExtensions.find { it.pkgName == pkgName }
|
val availableExt = availableExtensions.find { it.pkgName == pkgName }
|
||||||
|
|
||||||
if (availableExt == null && !installedExt.isObsolete) {
|
if (!installedExt.isUnofficial && availableExt == null && !installedExt.isObsolete) {
|
||||||
mutInstalledExtensions[index] = installedExt.copy(isObsolete = true)
|
mutInstalledExtensions[index] = installedExt.copy(isObsolete = true)
|
||||||
changed = true
|
changed = true
|
||||||
} else if (availableExt != null) {
|
} else if (availableExt != null) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ internal class ExtensionGithubApi {
|
||||||
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 hasUpdate = availableExt.versionCode > installedExt.versionCode
|
val hasUpdate = installedExt.isUnofficial.not() && (availableExt.versionCode > installedExt.versionCode)
|
||||||
if (hasUpdate) {
|
if (hasUpdate) {
|
||||||
extensionsWithUpdate.add(installedExt)
|
extensionsWithUpdate.add(installedExt)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue