Commit da09a686 authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Adrien Béraud

plugins: fix saveConfig logic

Change-Id: Iebb5804098699ca206a506cf8e1362faf1ef1aff
parent 25511994
......@@ -28,13 +28,21 @@ namespace DRing {
bool
loadPlugin(const std::string& path)
{
return jami::Manager::instance().getJamiPluginManager().loadPlugin(path);
bool status = jami::Manager::instance().getJamiPluginManager().loadPlugin(path);
jami::Manager::instance().pluginPreferences.saveStateLoadedPlugins(path, status);
jami::Manager::instance().saveConfig();
return status;
}
bool
unloadPlugin(const std::string& path)
{
return jami::Manager::instance().getJamiPluginManager().unloadPlugin(path);
bool status = jami::Manager::instance().getJamiPluginManager().unloadPlugin(path);
jami::Manager::instance().pluginPreferences.saveStateLoadedPlugins(path, false);
jami::Manager::instance().saveConfig();
return status;
}
void
......
......@@ -302,8 +302,6 @@ JamiPluginManager::loadPlugin(const std::string& rootPath)
bool status = pm_.load(getPluginDetails(rootPath).at("soPath"));
JAMI_INFO() << "PLUGIN: load status - " << status;
jami::Manager::instance().pluginPreferences.saveStateLoadedPlugins(rootPath, status);
jami::Manager::instance().saveConfig();
return status;
} catch (const std::exception& e) {
......@@ -322,9 +320,6 @@ JamiPluginManager::unloadPlugin(const std::string& rootPath)
bool status = pm_.unload(getPluginDetails(rootPath).at("soPath"));
JAMI_INFO() << "PLUGIN: unload status - " << status;
jami::Manager::instance().pluginPreferences.saveStateLoadedPlugins(rootPath, false);
jami::Manager::instance().saveConfig();
return status;
} catch (const std::exception& e) {
JAMI_ERR() << e.what();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment