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 627929203f
commit 92a307747f

View File

@@ -264,9 +264,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") {