Commit cefd6476 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/components/contact/VcardModel): update sip address -> add then remove...

fix(src/components/contact/VcardModel): update sip address -> add then remove to avoid a `only existing...` error
parent e88d1d09
...@@ -336,8 +336,9 @@ void VcardModel::removeSipAddress (const QString &sipAddress) { ...@@ -336,8 +336,9 @@ void VcardModel::removeSipAddress (const QString &sipAddress) {
} }
bool VcardModel::updateSipAddress (const QString &oldSipAddress, const QString &sipAddress) { bool VcardModel::updateSipAddress (const QString &oldSipAddress, const QString &sipAddress) {
removeSipAddress(oldSipAddress); bool soFarSoGood = addSipAddress(sipAddress);
return addSipAddress(sipAddress); removeSipAddress(oldSipAddress); // Remove after. Avoid `Unable to remove the only sip address...` error.
return soFarSoGood;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
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