mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Fix new extension install not registering in app. (#275)
* Fix extension install not registering * fix duplicate key compose error on extension update * fix doubling of extension after update * not needed
This commit is contained in:
parent
aa498360db
commit
79f46b25f6
1 changed files with 6 additions and 3 deletions
|
@ -340,9 +340,12 @@ class ExtensionManager(
|
||||||
override fun onExtensionUntrusted(extension: Extension.Untrusted) {
|
override fun onExtensionUntrusted(extension: Extension.Untrusted) {
|
||||||
val installedExtension = _installedExtensionsFlow.value
|
val installedExtension = _installedExtensionsFlow.value
|
||||||
.find { it.pkgName == extension.pkgName }
|
.find { it.pkgName == extension.pkgName }
|
||||||
?: return
|
|
||||||
_installedExtensionsFlow.value -= installedExtension
|
if (installedExtension != null) {
|
||||||
_untrustedExtensionsFlow.value += extension
|
_installedExtensionsFlow.value -= installedExtension
|
||||||
|
} else {
|
||||||
|
_untrustedExtensionsFlow.value += extension
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPackageUninstalled(pkgName: String) {
|
override fun onPackageUninstalled(pkgName: String) {
|
||||||
|
|
Loading…
Reference in a new issue