Commit bc5b6841 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

account: update info after migration

Change-Id: I11474b70cc7de1ea8b9ac5d38f22686cb1289b07
parent 4db0f519
......@@ -536,9 +536,17 @@ void
NewAccountModelPimpl::slotMigrationEnded(const std::string& accountId, bool ok)
{
if (ok) {
// Previous account was incorrect, force a full reload
removeFromAccounts(accountId);
auto it = accounts.find(accountId);
if (it == accounts.end()) {
addToAccounts(accountId);
return;
}
auto& accountInfo = it->second.first;
MapStringString details = ConfigurationManager::instance().getAccountDetails(accountId.c_str());
accountInfo.fromDetails(details);
MapStringString volatileDetails = ConfigurationManager::instance().getVolatileAccountDetails(accountId.c_str());
std::string daemonStatus = volatileDetails[DRing::Account::ConfProperties::Registration::STATUS].toStdString();
accountInfo.status = lrc::api::account::to_status(daemonStatus);
}
emit linked.migrationEnded(accountId, ok);
}
......
Supports Markdown
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