From 7106d7af712cfbacc965747646138cf346547f0d Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 7 Jan 2016 14:44:22 +0100 Subject: [PATCH 1/2] Don't forward any transient notifications to the watch. --- daemon/notificationmanager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/daemon/notificationmanager.cpp b/daemon/notificationmanager.cpp index e485703..f123c23 100644 --- a/daemon/notificationmanager.cpp +++ b/daemon/notificationmanager.cpp @@ -112,14 +112,15 @@ uint NotificationManager::Notify(const QString &app_name, uint replaces_id, cons Q_UNUSED(actions); Q_UNUSED(expire_timeout); - // Ignore notifcations from myself - if (app_name == "pebbled") { + // new place to check notification owner in Sailfish 1.1.6 + QString owner = hints.value("x-nemo-owner", "none").toString(); + + // Ignore transient notifcations + if (hints.value("transient", false).toBool() == true) { + qCDebug(l) << "Ignoring transient notification from " << owner; return 0; } - // new place to check notification owner in Sailfish 1.1.6 - QString owner = hints.value("x-nemo-owner").toString(); - qCDebug(l) << Q_FUNC_INFO << "Got notification via dbus from" << this->getCleanAppName(app_name) << " Owner: " << owner; qCDebug(l) << hints; From 617f81b19c0986c7a71a40ae9daaf18679606b96 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 7 Jan 2016 15:30:44 +0100 Subject: [PATCH 2/2] Remove unnecessary comparison for boolean. --- daemon/notificationmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/notificationmanager.cpp b/daemon/notificationmanager.cpp index f123c23..26c44e4 100644 --- a/daemon/notificationmanager.cpp +++ b/daemon/notificationmanager.cpp @@ -116,7 +116,7 @@ uint NotificationManager::Notify(const QString &app_name, uint replaces_id, cons QString owner = hints.value("x-nemo-owner", "none").toString(); // Ignore transient notifcations - if (hints.value("transient", false).toBool() == true) { + if (hints.value("transient", false).toBool()) { qCDebug(l) << "Ignoring transient notification from " << owner; return 0; }