Commit 15478b41 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

Fix the account removal job (it removed the account but never finished)

parent fb1a1424
......@@ -56,7 +56,13 @@ void RemoveAccountJob::start()
if (accountsManager) {
Accounts::Account *account = accountsManager->account(d->accountId.toInt());
if (account) {
connect(account, &Accounts::Account::synced, this, [this](){ emitResult(); });
// We can't depend on Accounts::Account::synced, as that doesn't necessarily get fired when
// asking for the account to be removed...
connect(accountsManager, &Accounts::Manager::accountRemoved, this, [this](Accounts::AccountId id) {
if (id == d->accountId.toUInt()) {
emitResult();
}
});
SignOn::Identity *identity = SignOn::Identity::existingIdentity(account->credentialsId(), this);
if (identity) {
identity->remove();
......
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