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 accessToken = loadAccessTokenFromKeyChain(account);
|
||||||
|
|
||||||
auto connection = new Connection(account.homeserver(), this);
|
auto connection = new Connection(account.homeserver(), this);
|
||||||
addConnection(connection);
|
|
||||||
connect(connection, &Connection::connected, this, [=] {
|
connect(connection, &Connection::connected, this, [=] {
|
||||||
connection->loadState();
|
connection->loadState();
|
||||||
|
addConnection(connection);
|
||||||
if (connection->userId() == id) {
|
if (connection->userId() == id) {
|
||||||
setActiveConnection(connection);
|
setActiveConnection(connection);
|
||||||
Q_EMIT initiated();
|
Q_EMIT initiated();
|
||||||
|
|||||||
Reference in New Issue
Block a user