Skip to content
Snippets Groups Projects
Commit be41645a authored by Adrien Béraud's avatar Adrien Béraud
Browse files

configuration: fix saving codec details

Change-Id: I16c3c467ee1b1b583f1dc74e2294b7c069331f73
parent 249bc589
No related branches found
No related tags found
No related merge requests found
...@@ -549,7 +549,7 @@ setActiveCodecList(const std::string& accountID ...@@ -549,7 +549,7 @@ setActiveCodecList(const std::string& accountID
if (auto acc = ring::Manager::instance().getAccount(accountID)) if (auto acc = ring::Manager::instance().getAccount(accountID))
{ {
acc->setActiveCodecs(list); acc->setActiveCodecs(list);
ring::Manager::instance().saveConfig(); ring::Manager::instance().saveConfig(acc);
} else { } else {
RING_ERR("Could not find account %s", accountID.c_str()); RING_ERR("Could not find account %s", accountID.c_str());
} }
......
...@@ -1685,6 +1685,15 @@ void Manager::pollEvents() ...@@ -1685,6 +1685,15 @@ void Manager::pollEvents()
//THREAD=Main //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 void
Manager::saveConfig(const std::shared_ptr<RingAccount>& account) Manager::saveConfig(const std::shared_ptr<RingAccount>& account)
{ {
......
...@@ -306,6 +306,7 @@ class Manager { ...@@ -306,6 +306,7 @@ class Manager {
*/ */
void saveConfig(); void saveConfig();
void saveConfig(const std::shared_ptr<RingAccount>&); void saveConfig(const std::shared_ptr<RingAccount>&);
void saveConfig(const std::shared_ptr<Account>& acc);
/** /**
* Play a ringtone * Play a ringtone
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment