Fix NeoChat not syncing
This problem was caused because addConnection was starting the sync proccess unfortunally because the user wasn't connected this aborted almost immediately and then the sync proccess wouldn't run at all. Now start the sync proccess after making sure we are connected. Fix #228
This commit is contained in:
@@ -269,9 +269,9 @@ void Controller::invokeLogin()
|
||||
auto accessToken = loadAccessTokenFromKeyChain(account);
|
||||
|
||||
auto connection = new Connection(account.homeserver(), this);
|
||||
addConnection(connection);
|
||||
connect(connection, &Connection::connected, this, [=] {
|
||||
connection->loadState();
|
||||
addConnection(connection);
|
||||
if (connection->userId() == id) {
|
||||
setActiveConnection(connection);
|
||||
Q_EMIT initiated();
|
||||
|
||||
Reference in New Issue
Block a user