diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2014-08-13 07:25:22 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2014-08-13 07:25:22 +0200 |
| commit | 3ece26b79ab9565bedc0f8b68f248efcb310df3d (patch) | |
| tree | f1c9225a309fb099a3ac25b328e93e1d45f36814 | |
| parent | 6b85e05470012c118710794fbeccb2ac31ec328e (diff) | |
| parent | 2f3196ed2cac357edaad50ee98ad96f54845cb71 (diff) | |
Merge pull request #17 from smurfy/fix_16
Handle e-mail notifications without subject. Closes #16
| -rw-r--r-- | daemon/notificationmanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/daemon/notificationmanager.cpp b/daemon/notificationmanager.cpp index 1b888d5..6db2514 100644 --- a/daemon/notificationmanager.cpp +++ b/daemon/notificationmanager.cpp @@ -130,7 +130,14 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons QString subject = hints.value("x-nemo-preview-summary", "").toString(); QString data = hints.value("x-nemo-preview-body", "").toString(); - if (!data.isEmpty() && !subject.isEmpty()) { + + //Prioritize subject over data + if (subject.isEmpty() && !data.isEmpty()) { + subject = data; + data = ""; + } + + if (!subject.isEmpty()) { emit this->emailNotify(subject, data, ""); } } else if (app_name == "commhistoryd") { |
