diff --git a/data/notifications/x-nemo.call.missed.conf b/data/notifications/x-nemo.call.missed.conf index 8c74b92..cac9e54 100644 --- a/data/notifications/x-nemo.call.missed.conf +++ b/data/notifications/x-nemo.call.missed.conf @@ -1,7 +1,4 @@ -appIcon=icon-lock-missed-call +app_icon=icon-lock-missed-call urgency=2 -x-nemo-icon=icon-lock-missed-call x-nemo-priority=120 -x-nemo-max-content-lines=1 x-nemo-feedback=call_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.call.missed.group.conf b/data/notifications/x-nemo.call.missed.group.conf index 8c74b92..cac9e54 100644 --- a/data/notifications/x-nemo.call.missed.group.conf +++ b/data/notifications/x-nemo.call.missed.group.conf @@ -1,7 +1,4 @@ -appIcon=icon-lock-missed-call +app_icon=icon-lock-missed-call urgency=2 -x-nemo-icon=icon-lock-missed-call x-nemo-priority=120 -x-nemo-max-content-lines=1 x-nemo-feedback=call_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.authorizationrequest.conf b/data/notifications/x-nemo.messaging.authorizationrequest.conf index ce9f231..252ad09 100644 --- a/data/notifications/x-nemo.messaging.authorizationrequest.conf +++ b/data/notifications/x-nemo.messaging.authorizationrequest.conf @@ -1,6 +1,4 @@ -appIcon=icon-lock-sms -x-nemo-icon=icon-lock-invitation -x-nemo-preview-icon=icon-s-status-invitation-pending +app_icon=icon-s-status-invitation-pending x-nemo-feedback=default x-nemo-user-removable=false x-nemo-priority=90 diff --git a/data/notifications/x-nemo.messaging.error.conf b/data/notifications/x-nemo.messaging.error.conf index 74bba23..29c92f6 100644 --- a/data/notifications/x-nemo.messaging.error.conf +++ b/data/notifications/x-nemo.messaging.error.conf @@ -1,3 +1,3 @@ -appIcon=icon-lock-information +app_icon=icon-lock-information urgency=2 transient=true diff --git a/data/notifications/x-nemo.messaging.error.strong.conf b/data/notifications/x-nemo.messaging.error.strong.conf index 954839f..54993f7 100644 --- a/data/notifications/x-nemo.messaging.error.strong.conf +++ b/data/notifications/x-nemo.messaging.error.strong.conf @@ -1,4 +1,4 @@ -appIcon=icon-lock-information +app_icon=icon-lock-information urgency=2 transient=true x-nemo-feedback=warning_strong diff --git a/data/notifications/x-nemo.messaging.group.conf b/data/notifications/x-nemo.messaging.group.conf index 3b6a2a0..c947569 100644 --- a/data/notifications/x-nemo.messaging.group.conf +++ b/data/notifications/x-nemo.messaging.group.conf @@ -1,6 +1,4 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms urgency=2 -x-nemo-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=sms_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.group.preview.conf b/data/notifications/x-nemo.messaging.group.preview.conf index fbe3425..0e92430 100644 --- a/data/notifications/x-nemo.messaging.group.preview.conf +++ b/data/notifications/x-nemo.messaging.group.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms transient=true urgency=2 -x-nemo-preview-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=sms x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.im.conf b/data/notifications/x-nemo.messaging.im.conf index d86fe71..f07a89f 100644 --- a/data/notifications/x-nemo.messaging.im.conf +++ b/data/notifications/x-nemo.messaging.im.conf @@ -1,7 +1,4 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms urgency=2 -x-nemo-icon=icon-lock-sms x-nemo-priority=120 -x-nemo-max-content-lines=6 x-nemo-feedback=chat_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.im.preview.conf b/data/notifications/x-nemo.messaging.im.preview.conf index 0fb30b3..1ac6f8d 100644 --- a/data/notifications/x-nemo.messaging.im.preview.conf +++ b/data/notifications/x-nemo.messaging.im.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms transient=true urgency=2 -x-nemo-preview-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=chat x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.mms.conf b/data/notifications/x-nemo.messaging.mms.conf index bf2033b..c947569 100644 --- a/data/notifications/x-nemo.messaging.mms.conf +++ b/data/notifications/x-nemo.messaging.mms.conf @@ -1,7 +1,4 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms urgency=2 -x-nemo-icon=icon-lock-sms x-nemo-priority=120 -x-nemo-max-content-lines=6 x-nemo-feedback=sms_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.mms.preview.conf b/data/notifications/x-nemo.messaging.mms.preview.conf index fbe3425..0e92430 100644 --- a/data/notifications/x-nemo.messaging.mms.preview.conf +++ b/data/notifications/x-nemo.messaging.mms.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms transient=true urgency=2 -x-nemo-preview-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=sms x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.sms.conf b/data/notifications/x-nemo.messaging.sms.conf index bf2033b..c947569 100644 --- a/data/notifications/x-nemo.messaging.sms.conf +++ b/data/notifications/x-nemo.messaging.sms.conf @@ -1,7 +1,4 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms urgency=2 -x-nemo-icon=icon-lock-sms x-nemo-priority=120 -x-nemo-max-content-lines=6 x-nemo-feedback=sms_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.sms.preview.conf b/data/notifications/x-nemo.messaging.sms.preview.conf index fbe3425..0e92430 100644 --- a/data/notifications/x-nemo.messaging.sms.preview.conf +++ b/data/notifications/x-nemo.messaging.sms.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms transient=true urgency=2 -x-nemo-preview-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=sms x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.voicemail-SMS.conf b/data/notifications/x-nemo.messaging.voicemail-SMS.conf index 3b6a2a0..c947569 100644 --- a/data/notifications/x-nemo.messaging.voicemail-SMS.conf +++ b/data/notifications/x-nemo.messaging.voicemail-SMS.conf @@ -1,6 +1,4 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms urgency=2 -x-nemo-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=sms_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.voicemail-SMS.preview.conf b/data/notifications/x-nemo.messaging.voicemail-SMS.preview.conf index fbe3425..0e92430 100644 --- a/data/notifications/x-nemo.messaging.voicemail-SMS.preview.conf +++ b/data/notifications/x-nemo.messaging.voicemail-SMS.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-sms +app_icon=icon-lock-sms transient=true urgency=2 -x-nemo-preview-icon=icon-lock-sms x-nemo-priority=120 x-nemo-feedback=sms x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.voicemail-waiting.conf b/data/notifications/x-nemo.messaging.voicemail-waiting.conf index e678c02..8326124 100644 --- a/data/notifications/x-nemo.messaging.voicemail-waiting.conf +++ b/data/notifications/x-nemo.messaging.voicemail-waiting.conf @@ -1,9 +1,5 @@ -appIcon=icon-lock-voicemail -x-nemo-icon=icon-lock-voicemail -x-nemo-preview-icon=icon-lock-voicemail +app_icon=icon-lock-voicemail x-nemo-priority=120 -x-nemo-max-content-lines=1 x-nemo-user-removable=false x-nemo-feedback=sms,sms_exists -x-nemo-led-disabled-without-body-and-summary=false x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.voicemail.conf b/data/notifications/x-nemo.messaging.voicemail.conf index df36467..66b8194 100644 --- a/data/notifications/x-nemo.messaging.voicemail.conf +++ b/data/notifications/x-nemo.messaging.voicemail.conf @@ -1,8 +1,5 @@ -appIcon=icon-lock-voicemail +app_icon=icon-lock-voicemail urgency=2 -x-nemo-icon=icon-lock-voicemail x-nemo-user-removable=false x-nemo-priority=120 -x-nemo-max-content-lines=1 x-nemo-feedback=sms_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.voicemail.group.conf b/data/notifications/x-nemo.messaging.voicemail.group.conf index 2728096..07192ca 100644 --- a/data/notifications/x-nemo.messaging.voicemail.group.conf +++ b/data/notifications/x-nemo.messaging.voicemail.group.conf @@ -1,8 +1,5 @@ -appIcon=icon-lock-voicemail +app_icon=icon-lock-voicemail urgency=2 -x-nemo-icon=icon-lock-voicemail x-nemo-priority=120 x-nemo-user-removable=false -x-nemo-max-content-lines=1 x-nemo-feedback=sms_exists -x-nemo-led-disabled-without-body-and-summary=false diff --git a/data/notifications/x-nemo.messaging.voicemail.group.preview.conf b/data/notifications/x-nemo.messaging.voicemail.group.preview.conf index baff219..9dd69ee 100644 --- a/data/notifications/x-nemo.messaging.voicemail.group.preview.conf +++ b/data/notifications/x-nemo.messaging.voicemail.group.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-voicemail +app_icon=icon-lock-voicemail transient=true urgency=2 -x-nemo-preview-icon=icon-lock-voicemail x-nemo-priority=120 x-nemo-feedback=sms x-nemo-display-on=true diff --git a/data/notifications/x-nemo.messaging.voicemail.preview.conf b/data/notifications/x-nemo.messaging.voicemail.preview.conf index baff219..9dd69ee 100644 --- a/data/notifications/x-nemo.messaging.voicemail.preview.conf +++ b/data/notifications/x-nemo.messaging.voicemail.preview.conf @@ -1,7 +1,6 @@ -appIcon=icon-lock-voicemail +app_icon=icon-lock-voicemail transient=true urgency=2 -x-nemo-preview-icon=icon-lock-voicemail x-nemo-priority=120 x-nemo-feedback=sms x-nemo-display-on=true diff --git a/src/notificationgroup.cpp b/src/notificationgroup.cpp index 70ff1a7..c5be973 100644 --- a/src/notificationgroup.cpp +++ b/src/notificationgroup.cpp @@ -2,7 +2,8 @@ ** ** This file is part of commhistory-daemon. ** -** Copyright (C) 2013 Jolla Ltd. +** Copyright (C) 2020 Open Mobile Platform LLC. +** Copyright (C) 2013 - 2019 Jolla Ltd. ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** Contact: John Brooks ** @@ -145,10 +146,20 @@ void NotificationGroup::updateGroup() connect(mGroup, SIGNAL(closed(uint)), SLOT(onClosed(uint))); } + const QString body(notificationGroupText()); + mGroup->setAppName(groupName(m_collection)); mGroup->setCategory(groupCategory(m_collection)); mGroup->setSummary(mLocale.joinStringList(contactNames())); - mGroup->setBody(notificationGroupText()); + if (m_collection != PersonalNotification::Voice + && m_collection != PersonalNotification::Voicemail) { + // For missed calls and voicemail, the Events view notification is compressed into one + // line with only the summary, as the body information is duplicated in the notification + // group header ('missed calls' or 'new voicemails'). + mGroup->setBody(body); + } + mGroup->clearPreviewSummary(); + mGroup->clearPreviewBody(); mGroup->setItemCount(mNotifications.size()); // This group is only visible if the members are hidden @@ -186,7 +197,7 @@ void NotificationGroup::updateGroup() preview.setAppName(mGroup->appName()); preview.setCategory(mGroup->category() + QStringLiteral(".preview")); preview.setPreviewSummary(mGroup->summary()); - preview.setPreviewBody(mGroup->body()); + preview.setPreviewBody(body); NotificationManager::instance()->setNotificationProperties(&preview, mNotifications[0], grouped); diff --git a/src/notificationmanager.cpp b/src/notificationmanager.cpp index b15d3f3..7f2719a 100644 --- a/src/notificationmanager.cpp +++ b/src/notificationmanager.cpp @@ -2,6 +2,7 @@ ** ** This file is part of commhistory-daemon. ** +** Copyright (C) 2020 Open Mobile Platform LLC. ** Copyright (C) 2013-2016 Jolla Ltd. ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** Contact: John Brooks @@ -809,7 +810,6 @@ void NotificationManager::slotVoicemailWaitingChanged() voicemailNotification.setPreviewBody(txt_qtn_voicemail_prompt); voicemailNotification.setSummary(voicemailNotification.previewSummary()); - voicemailNotification.setBody(voicemailNotification.previewBody()); voicemailNotification.setItemCount(voicemailCount); diff --git a/src/personalnotification.cpp b/src/personalnotification.cpp index 627ebee..f79fb47 100644 --- a/src/personalnotification.cpp +++ b/src/personalnotification.cpp @@ -128,6 +128,8 @@ void PersonalNotification::publishNotification() m_notification->setHintValue("x-nemo-hidden", m_hidden); m_notification->setSummary(name); m_notification->setBody(notificationText()); + m_notification->clearPreviewSummary(); + m_notification->clearPreviewBody(); NotificationManager::instance()->setNotificationProperties(m_notification, this, false);