From 64f60c36e61ea186e246370634835abc6b7c9b0c Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Sun, 10 Jul 2022 20:00:48 +0600 Subject: [PATCH] ExtensionManger: Fix unofficial extension has update (#7503) --- .../java/eu/kanade/tachiyomi/extension/ExtensionManager.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt index c4a0c6cdee..f8e0368213 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt @@ -211,7 +211,9 @@ class ExtensionManager( mutInstalledExtensions[index] = installedExt.copy(isObsolete = true) changed = true } else if (availableExt != null) { - val hasUpdate = availableExt.versionCode > installedExt.versionCode + val hasUpdate = !installedExt.isUnofficial && + availableExt.versionCode > installedExt.versionCode + if (installedExt.hasUpdate != hasUpdate) { mutInstalledExtensions[index] = installedExt.copy(hasUpdate = hasUpdate) changed = true @@ -381,7 +383,7 @@ class ExtensionManager( */ private fun Extension.Installed.withUpdateCheck(): Extension.Installed { val availableExt = availableExtensions.find { it.pkgName == pkgName } - if (availableExt != null && availableExt.versionCode > versionCode) { + if (isUnofficial.not() && availableExt != null && availableExt.versionCode > versionCode) { return copy(hasUpdate = true) } return this