Fix active connection not loading on startup

This commit is contained in:
Tobias Fella
2020-12-30 02:07:27 +01:00
committed by Carl Schwan
parent bd00a73aa9
commit 2c1cbc91d8

View File

@@ -261,9 +261,9 @@ void Controller::invokeLogin()
auto accessToken = loadAccessTokenFromKeyChain(account);
auto c = new Connection(account.homeserver(), this);
addConnection(c);
connect(c, &Connection::connected, this, [=] {
c->loadState();
addConnection(c);
});
connect(c, &Connection::loginError, this, [=](const QString &error, const QString &) {
if (error == "Unrecognised access token") {