Skip to content

Commit

Permalink
fix extension won't update (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran authored Aug 31, 2024
1 parent e372542 commit c498e77
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -280,7 +285,12 @@ class ExtensionManager(
* @param extension The extension to be updated.
*/
fun updateExtension(extension: Extension.Installed): Flow<InstallStep> {
val availableExt = availableExtensionMapFlow.value[extension.pkgName] ?: return emptyFlow()
val availableExt = availableExtensionMapFlow.value[
extension.pkgName +
// KMK -->
":${extension.signatureHash}",
// KMK <--
] ?: return emptyFlow()
return installExtension(availableExt)
}

Expand Down

0 comments on commit c498e77

Please sign in to comment.