diff --git a/README.md b/README.md index 4c6b6db..fd87b4e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Sebastian J. Wolf [sebastian@ygriega.de](mailto:sebastian@ygriega.de) and severa Fernschreiber wouldn't be the same without all the people helping in making it better. Thank you very much to all contributors! ### Code (Features, Bugfixes, Optimizations etc.) -- Chat list model, TDLib receiver, project dependencies: [Slava Monich](https://github.com/monich) +- Chat list model, notifications, TDLib receiver, project dependencies: [Slava Monich](https://github.com/monich) - Chat info page, performance improvements to chat page, location support, app initialization/registration with Telegram, project dependencies: [jgibbon](https://github.com/jgibbon) - Copy message to clipboard [Christian Stemmle](https://github.com/chstem) diff --git a/src/notificationmanager.cpp b/src/notificationmanager.cpp index e2ad90a..d80c939 100644 --- a/src/notificationmanager.cpp +++ b/src/notificationmanager.cpp @@ -378,8 +378,16 @@ void NotificationManager::publishNotification(const NotificationGroup *notificat nemoNotification->setSummary(chatInformation ? chatInformation->title : QString()); if (needFeedback) { nemoNotification->setCategory(NOTIFICATION_CATEGORY); - nemoNotification->setPreviewBody(nemoNotification->body()); - nemoNotification->setPreviewSummary(nemoNotification->summary()); + + // Setting preview body & summary to a non-empty string causes a notification popup, + // no matter if we are in the current chat, in the app or not. That might be annoying + // In the future, we can show this popup depending if the app/chat is open or not + // + // nemoNotification->setPreviewBody(nemoNotification->body()); + // nemoNotification->setPreviewSummary(nemoNotification->summary()); + + nemoNotification->setPreviewBody(QString()); + nemoNotification->setPreviewSummary(QString()); ngfClient->play(NGF_EVENT); } else { nemoNotification->setCategory(QString());