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
|
@Synchronized
|
||||||
private fun addPlugin(pluginKey: String): Boolean {
|
private fun addPlugin(pluginKey: String): Boolean {
|
||||||
val isNewPlugin = loadedPlugins.containsKey(pluginKey)
|
val isNewPlugin = !loadedPlugins.containsKey(pluginKey)
|
||||||
|
|
||||||
val plugin = loadedPlugins[pluginKey]
|
val plugin = loadedPlugins[pluginKey]
|
||||||
?: PluginFactory.instantiatePluginForDevice(context, pluginKey, this)
|
?: PluginFactory.instantiatePluginForDevice(context, pluginKey, this)
|
||||||
@@ -572,6 +572,7 @@ class Device : PacketReceiver {
|
|||||||
if (!isNewPlugin) {
|
if (!isNewPlugin) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return runCatching {
|
return runCatching {
|
||||||
plugin.onCreate()
|
plugin.onCreate()
|
||||||
}.onFailure {
|
}.onFailure {
|
||||||
|
Reference in New Issue
Block a user