Port away from commitSingleShot

This commit is contained in:
Tobias Fella
2024-06-08 15:39:27 +02:00
parent 91109ca845
commit 29972b5867
7 changed files with 197 additions and 104 deletions

View File

@@ -106,11 +106,16 @@ Controller::Controller(QObject *parent)
connect(connection, &NeoChatConnection::syncDone, this, [connection]() {
NotificationsManager::instance().handleNotifications(connection);
});
connectSingleShot(connection, &NeoChatConnection::syncDone, this, [this, connection] {
if (!m_endpoint.isEmpty()) {
connection->setupPushNotifications(m_endpoint);
}
});
connect(
connection,
&NeoChatConnection::syncDone,
this,
[this, connection] {
if (!m_endpoint.isEmpty()) {
connection->setupPushNotifications(m_endpoint);
}
},
Qt::SingleShotConnection);
}
oldAccountCount = m_accountRegistry.size();
});