From 92a307747f2ee82df371e399ae3f6a9adcc2df3b Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 30 Dec 2020 02:07:27 +0100 Subject: [PATCH] Fix active connection not loading on startup --- src/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller.cpp b/src/controller.cpp index c4ed8fd71..965ed0ee0 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -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") {