mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-25 16:34:11 +01: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
@ -340,10 +340,13 @@ class ExtensionManager(
|
||||
override fun onExtensionUntrusted(extension: Extension.Untrusted) {
|
||||
val installedExtension = _installedExtensionsFlow.value
|
||||
.find { it.pkgName == extension.pkgName }
|
||||
?: return
|
||||
|
||||
if (installedExtension != null) {
|
||||
_installedExtensionsFlow.value -= installedExtension
|
||||
} else {
|
||||
_untrustedExtensionsFlow.value += extension
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPackageUninstalled(pkgName: String) {
|
||||
ExtensionLoader.uninstallPrivateExtension(context, pkgName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user