diff --git a/src/controller.cpp b/src/controller.cpp index 7e89d54c9..ccc7d4bf3 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -98,9 +98,11 @@ Controller::Controller(QObject *parent) if (m_accountRegistry.size() > oldAccountCount) { auto connection = dynamic_cast(m_accountRegistry.accounts()[m_accountRegistry.size() - 1]); connect(connection, &NeoChatConnection::syncDone, this, [this, connection]() { - connection->setupPushNotifications(m_endpoint); NotificationsManager::instance().handleNotifications(connection); }); + connectSingleShot(connection, &NeoChatConnection::syncDone, this, [this, connection] { + connection->setupPushNotifications(m_endpoint); + }); } oldAccountCount = m_accountRegistry.size(); });