Fix some miscellaneous weirdness around push notifications
For some reason, I *stopped* the timer if we get a push message - which makes *no* sense. It meant that NeoChat kept running in the background for basically no reason. We can also make the NotificationsManager::postPushNotification function static and avoid creating some singletons.
This commit is contained in:
@@ -306,8 +306,7 @@ void Controller::listenForNotifications()
|
||||
connect(timer, &QTimer::timeout, qGuiApp, &QGuiApplication::quit);
|
||||
|
||||
connect(connector, &KUnifiedPush::Connector::messageReceived, [timer](const QByteArray &data) {
|
||||
instance().m_notificationsManager.postPushNotification(data);
|
||||
timer->stop();
|
||||
NotificationsManager::postPushNotification(data);
|
||||
});
|
||||
|
||||
// Wait five seconds to see if we received any messages or this happened to be an erroneous activation.
|
||||
|
||||
Reference in New Issue
Block a user