diff --git a/interfaces/notificationsmodel.h b/interfaces/notificationsmodel.h --- a/interfaces/notificationsmodel.h +++ b/interfaces/notificationsmodel.h @@ -46,7 +46,9 @@ DismissableModelRole, RepliableModelRole, IconPathModelRole, - DbusInterfaceRole + DbusInterfaceRole, + TitleModelRole, + TextModelRole }; explicit NotificationsModel(QObject* parent = nullptr); diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp --- a/interfaces/notificationsmodel.cpp +++ b/interfaces/notificationsmodel.cpp @@ -62,6 +62,8 @@ names.insert(DismissableModelRole, "dismissable"); names.insert(RepliableModelRole, "repliable"); names.insert(IconPathModelRole, "appIcon"); + names.insert(TitleModelRole, "title"); + names.insert(TextModelRole, "notitext"); return names; } @@ -198,6 +200,10 @@ return !notification->replyId().isEmpty(); case IconPathModelRole: return notification->iconPath(); + case TitleModelRole: + return notification->title(); + case TextModelRole: + return notification->text(); default: return QVariant(); } diff --git a/plasmoid/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml --- a/plasmoid/package/contents/ui/DeviceDelegate.qml +++ b/plasmoid/package/contents/ui/DeviceDelegate.qml @@ -228,7 +228,7 @@ anchors.left: parent.left } PlasmaComponents.Label { - text: appName + ": " + display + text: appName + ": " + (title.length>0 ? (appName==title?notitext:title+": "+notitext) : display) anchors.right: replyButton.left anchors.left: notificationIcon.right elide: listitem.checked ? Text.ElideNone : Text.ElideRight