Remove extension obsolete flag when updating db after extension list fetch (#807)

In case an extension got marked as obsolete and was found again in a set repo, the obsolete flag has to be removed
This commit is contained in:
schroda
2024-01-10 01:40:16 +01:00
committed by GitHub
parent 6376972130
commit 3a1e0c5a63
@@ -120,6 +120,14 @@ object ExtensionsList {
// add these because batch updates need matching columns
this[ExtensionTable.hasUpdate] = extensionRecord[ExtensionTable.hasUpdate]
this[ExtensionTable.isObsolete] = extensionRecord[ExtensionTable.isObsolete]
// a previously removed extension is now available again
if (extensionRecord[ExtensionTable.isObsolete] &&
foundExtension.versionCode >= extensionRecord[ExtensionTable.versionCode]
) {
this[ExtensionTable.isObsolete] = false
}
when {
foundExtension.versionCode > extensionRecord[ExtensionTable.versionCode] -> {
// there is an update