From c498e77cedef01261f448f12d1ab53fe77ee7b5c Mon Sep 17 00:00:00 2001 From: Cuong-Tran Date: Sun, 1 Sep 2024 03:05:07 +0700 Subject: [PATCH] fix extension won't update (#328) --- .../kanade/tachiyomi/extension/ExtensionManager.kt | 14 ++++++++++++-- 1 file changed, 12 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 f132708e27..f600524327 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt @@ -173,7 +173,12 @@ class ExtensionManager( enableAdditionalSubLanguages(extensions) - availableExtensionMapFlow.value = extensions.associateBy { "${it.pkgName}:${it.signatureHash}" } + availableExtensionMapFlow.value = extensions.associateBy { + it.pkgName + + // KMK --> + ":${it.signatureHash}" + // KMK <-- + } updatedInstalledExtensionsStatuses(extensions) setupAvailableExtensionsSourcesDataMap(extensions) } @@ -280,7 +285,12 @@ class ExtensionManager( * @param extension The extension to be updated. */ fun updateExtension(extension: Extension.Installed): Flow { - val availableExt = availableExtensionMapFlow.value[extension.pkgName] ?: return emptyFlow() + val availableExt = availableExtensionMapFlow.value[ + extension.pkgName + + // KMK --> + ":${extension.signatureHash}", + // KMK <-- + ] ?: return emptyFlow() return installExtension(availableExt) }