aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/accountregistry.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/accountregistry.cpp b/lib/accountregistry.cpp
index b40d5ecf..289f20dd 100644
--- a/lib/accountregistry.cpp
+++ b/lib/accountregistry.cpp
@@ -99,20 +99,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(),