Commit be41645a authored by Adrien Béraud's avatar Adrien Béraud

configuration: fix saving codec details

Change-Id: I16c3c467ee1b1b583f1dc74e2294b7c069331f73
parent 249bc589
......@@ -549,7 +549,7 @@ setActiveCodecList(const std::string& accountID
if (auto acc = ring::Manager::instance().getAccount(accountID))
{
acc->setActiveCodecs(list);
ring::Manager::instance().saveConfig();
ring::Manager::instance().saveConfig(acc);
} else {
RING_ERR("Could not find account %s", accountID.c_str());
}
......
......@@ -1685,6 +1685,15 @@ void Manager::pollEvents()
//THREAD=Main
void
Manager::saveConfig(const std::shared_ptr<Account>& acc)
{
if (auto ringAcc = std::dynamic_pointer_cast<RingAccount>(acc))
saveConfig(ringAcc);
else
saveConfig();
}
void
Manager::saveConfig(const std::shared_ptr<RingAccount>& account)
{
......
......@@ -306,6 +306,7 @@ class Manager {
*/
void saveConfig();
void saveConfig(const std::shared_ptr<RingAccount>&);
void saveConfig(const std::shared_ptr<Account>& acc);
/**
* Play a ringtone
......
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