diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-01 18:33:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-01 18:33:58 +0200 |
commit | 2142d4fef9eb3174c1ead5312548391178d0872e (patch) | |
tree | a95df053e0e937c3cc202d906b86702c7d34bc43 /lib | |
parent | 6c735f9f55b936e9de1497c2f5896f0a018d4227 (diff) | |
parent | fe66480d4f6d96444ca090df2ae04dc7da033ea4 (diff) | |
download | libquotient-2142d4fef9eb3174c1ead5312548391178d0872e.tar.gz libquotient-2142d4fef9eb3174c1ead5312548391178d0872e.zip |
Merge pull request #559 from TobiasFella/removeaccountsloading
Diffstat (limited to 'lib')
-rw-r--r-- | lib/accountregistry.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/accountregistry.cpp b/lib/accountregistry.cpp index f25369d6..2cab54a3 100644 --- a/lib/accountregistry.cpp +++ b/lib/accountregistry.cpp @@ -100,20 +100,29 @@ void AccountRegistry::invokeLogin() AccountSettings account { accountId }; auto connection = new Connection(account.homeserver()); connect(connection, &Connection::connected, this, - [connection] { + [connection, this, accountId] { connection->loadState(); connection->setLazyLoading(true); connection->syncLoop(); + + m_accountsLoading.removeAll(accountId); + emit accountsLoadingChanged(); }); connect(connection, &Connection::loginError, this, - [this, connection](const QString& error, + [this, connection, accountId](const QString& error, const QString& details) { emit loginError(connection, error, details); + + m_accountsLoading.removeAll(accountId); + emit accountsLoadingChanged(); }); connect(connection, &Connection::resolveError, this, - [this, connection](const QString& error) { + [this, connection, accountId](const QString& error) { emit resolveError(connection, error); + + m_accountsLoading.removeAll(accountId); + emit accountsLoadingChanged(); }); connection->assumeIdentity( account.userId(), accessTokenLoadingJob->binaryData(), |