mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-03 23:58:55 +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:
		@@ -340,9 +340,12 @@ class ExtensionManager(
 | 
			
		||||
        override fun onExtensionUntrusted(extension: Extension.Untrusted) {
 | 
			
		||||
            val installedExtension = _installedExtensionsFlow.value
 | 
			
		||||
                .find { it.pkgName == extension.pkgName }
 | 
			
		||||
                ?: return
 | 
			
		||||
            _installedExtensionsFlow.value -= installedExtension
 | 
			
		||||
            _untrustedExtensionsFlow.value += extension
 | 
			
		||||
 | 
			
		||||
            if (installedExtension != null) {
 | 
			
		||||
                _installedExtensionsFlow.value -= installedExtension
 | 
			
		||||
            } else {
 | 
			
		||||
                _untrustedExtensionsFlow.value += extension
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        override fun onPackageUninstalled(pkgName: String) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user