diff options
m--------- | libwatchfish | 0 | ||||
-rw-r--r-- | saltoqd/notificationmanager.cpp | 10 | ||||
-rw-r--r-- | saltoqd/notificationmanager.h | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/libwatchfish b/libwatchfish -Subproject 247176e61399f14f6d52638d74d5a2a2579c1f5 +Subproject 7ee859f6a5e6a334a172015fce744baeff53905 diff --git a/saltoqd/notificationmanager.cpp b/saltoqd/notificationmanager.cpp index 8e0e5d2..9c3a63c 100644 --- a/saltoqd/notificationmanager.cpp +++ b/saltoqd/notificationmanager.cpp @@ -5,14 +5,20 @@ using namespace watchfish; +static NotificationMonitor *monitor = 0; + NotificationManager::NotificationManager(CardManager *card, ToqManager *toq) : - QObject(toq), _toq(toq), _monitor(NotificationMonitor::instance()), + QObject(toq), _toq(toq), _card(card), _deck(new CardDeck("com.qualcomm.qce.androidnotifications", "Notifications", this)) { _card->installDeck(_deck); - connect(_monitor, &NotificationMonitor::notification, + if (monitor == 0) { + monitor = new NotificationMonitor; + } + + connect(monitor, &NotificationMonitor::notification, this, &NotificationManager::handleNotification); } diff --git a/saltoqd/notificationmanager.h b/saltoqd/notificationmanager.h index 5280073..cd5a258 100644 --- a/saltoqd/notificationmanager.h +++ b/saltoqd/notificationmanager.h @@ -23,7 +23,6 @@ private slots: private: ToqManager *_toq; - watchfish::NotificationMonitor *_monitor; CardManager *_card; CardDeck *_deck; QMap<uint, Card*> _cards; |