Skip to content

Commit

Permalink
Remove extension obsolete flag when updating db after extension list …
Browse files Browse the repository at this point in the history
…fetch

In case an extension got marked as obsolete and was found again in a set repo, the obsolete flag has to be removed
  • Loading branch information
schroda committed Jan 9, 2024
1 parent c70c860 commit 2ff7d4f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ object ExtensionsList {
this[ExtensionTable.hasUpdate] = extensionRecord[ExtensionTable.hasUpdate]
this[ExtensionTable.isObsolete] = extensionRecord[ExtensionTable.isObsolete]
when {
extensionRecord[ExtensionTable.isObsolete] &&
foundExtension.versionCode == extensionRecord[ExtensionTable.versionCode] -> {
// a previously removed extension is now available again
this[ExtensionTable.isObsolete] = false
}
foundExtension.versionCode > extensionRecord[ExtensionTable.versionCode] -> {
// there is an update
this[ExtensionTable.hasUpdate] = true
Expand Down

0 comments on commit 2ff7d4f

Please sign in to comment.