From a4f2d8fca185b7b4d880d19ca508590401bcfad2 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 1 Aug 2025 12:11:35 +0200 Subject: [PATCH] Fix loading (cherry picked from commit d14466451dcc91c9b573814e1461045147fce173) --- src/login/login.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/login/login.cpp b/src/login/login.cpp index f7b425201..a83f30a91 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -86,6 +86,14 @@ void LoginHelper::init() m_accountManager->addConnection(m_connection); m_accountManager->setActiveConnection(m_connection); disconnect(m_connection, nullptr, this, nullptr); + connect( + m_connection.get(), + &NeoChatConnection::syncDone, + this, + [this]() { + Q_EMIT loaded(); + }, + Qt::SingleShotConnection); m_connection = nullptr; }); connect(m_connection, &NeoChatConnection::networkError, this, [this](QString error, const QString &, int, int) { @@ -106,15 +114,6 @@ void LoginHelper::init() connect(m_connection, &NeoChatConnection::resolveError, this, [this](QString error) { Q_EMIT m_connection->errorOccured(i18n("Network Error: %1", std::move(error))); }); - - connect( - m_connection.get(), - &NeoChatConnection::syncDone, - this, - [this]() { - Q_EMIT loaded(); - }, - Qt::SingleShotConnection); } void LoginHelper::setHomeserverReachable(bool reachable)