mirror of
https://invent.kde.org/network/kdeconnect-android.git
synced 2025-10-05 16:12:42 +02:00
Properly fix the condition for newPlugin
BUG: 510160
This commit is contained in:
@@ -536,7 +536,7 @@ class Device : PacketReceiver {
|
||||
|
||||
@Synchronized
|
||||
private fun addPlugin(pluginKey: String): Boolean {
|
||||
val isNewPlugin = loadedPlugins.containsKey(pluginKey)
|
||||
val isNewPlugin = !loadedPlugins.containsKey(pluginKey)
|
||||
|
||||
val plugin = loadedPlugins[pluginKey]
|
||||
?: PluginFactory.instantiatePluginForDevice(context, pluginKey, this)
|
||||
@@ -572,6 +572,7 @@ class Device : PacketReceiver {
|
||||
if (!isNewPlugin) {
|
||||
return true
|
||||
}
|
||||
|
||||
return runCatching {
|
||||
plugin.onCreate()
|
||||
}.onFailure {
|
||||
|
Reference in New Issue
Block a user