mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-13 17:06:29 +00:00
fix plugin loading
This commit is contained in:
parent
ef402be6fc
commit
943d19a439
@ -69,7 +69,7 @@ void SnoreCore::loadPlugins(SnorePlugin::PluginTypes types)
|
||||
case SnorePlugin::SECONDARY_BACKEND:
|
||||
case SnorePlugin::FRONTEND:
|
||||
case SnorePlugin::PLUGIN: {
|
||||
if (plugin->value("Enabled").toBool()) {
|
||||
if (plugin->value("Enabled",LOCAL_SETTING).toBool()) {
|
||||
if (!plugin->initialize()) {
|
||||
snoreDebug(SNORE_WARNING) << "Failed to initialize" << plugin->name();
|
||||
plugin->deinitialize();
|
||||
|
@ -145,7 +145,7 @@ void SnoreCorePrivate::syncSettings()
|
||||
//TODO: cleanup
|
||||
auto syncPluginStatus = [&](const QString &pluginName){
|
||||
SnorePlugin *plugin = m_plugins.value(pluginName);
|
||||
bool enable = m_plugins[pluginName]->value("Enabled").toBool();
|
||||
bool enable = m_plugins[pluginName]->value("Enabled", LOCAL_SETTING).toBool();
|
||||
if (!plugin->isInitialized() && enable) {
|
||||
plugin->initialize();
|
||||
} else if (plugin->isInitialized() && !enable) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user