diff options
author | Javier S. Pedro <dev.git@javispedro.com> | 2014-09-27 15:31:41 +0200 |
---|---|---|
committer | Javier S. Pedro <dev.git@javispedro.com> | 2014-09-27 15:31:41 +0200 |
commit | 02972ed370063c8bd215bf1e907da9dc1abef1d1 (patch) | |
tree | 2d4e676a3f8765f1666d0874bca00f5a11f05a0a /src | |
parent | ef8a06f4cf720e293534d591069c4c4295dd21a1 (diff) | |
download | salmeta-02972ed370063c8bd215bf1e907da9dc1abef1d1.tar.gz salmeta-02972ed370063c8bd215bf1e907da9dc1abef1d1.zip |
avoid some empty notifications for now
Diffstat (limited to 'src')
-rw-r--r-- | src/notificationmonitor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/notificationmonitor.cpp b/src/notificationmonitor.cpp index ef64ea1..2001b25 100644 --- a/src/notificationmonitor.cpp +++ b/src/notificationmonitor.cpp @@ -58,6 +58,11 @@ uint NotificationMonitor::Notify(const QString &app_name, uint replaces_id, cons int count = hints.value("x-nemo-item-count").toInt(); QDateTime dateTime = hints.value("x-nemo-timestamp").toDateTime(); + if (summary.isEmpty() && body.isEmpty()) { + // Avoid sending empty notifications to watch. + return 0; + } + emit incomingNotification(app_name, icon, summary, count, body, dateTime); return 0; |