Offer updates for extensions that aren't loaded

Extensions that aren't loaded now get updates like loaded ones, which is often what gets them loaded again. They're counted, notified and listed with the other pending updates. Every installed extension, loaded or not, records the added store whose key signed it when it loads.
This commit is contained in:
AntsyLich
2026-09-28 00:46:54 +06:00
parent 0938411053
commit 2d86a70ce2
10 changed files with 77 additions and 24 deletions
@@ -25,6 +25,10 @@ sealed interface Extension {
/** SHA-256 digests of the certificates its apk is signed with. */
val signatures: List<String>
val hasUpdate: Boolean
val store: ExtensionStore?
/**
* The newest listing of this extension among the stores whose signing key it's signed with. An
* apk from any other store can't replace it, so only these are where its updates come from.
@@ -92,9 +96,9 @@ sealed interface Extension {
val pkgFactory: String?,
val sources: List<Source>,
val icon: Drawable?,
val hasUpdate: Boolean = false,
override val hasUpdate: Boolean = false,
val isObsolete: Boolean = false,
val store: ExtensionStore? = null,
override val store: ExtensionStore? = null,
) : Installed
/**
@@ -111,6 +115,8 @@ sealed interface Extension {
override val signatures: List<String>,
override val libVersion: Double? = null,
override val lang: String? = null,
override val hasUpdate: Boolean = false,
override val store: ExtensionStore? = null,
val reason: Reason,
) : Installed {