Verified Commit 8adfa3d7 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

[applets/notifications] Show "Just now" time label for recent notifications

parent 0536cf41
Pipeline #225912 passed with stage
in 9 minutes and 38 seconds
......@@ -23,6 +23,7 @@ import "global"
RowLayout {
id: notificationHeading
property bool inGroup
property bool inHistory
property int notificationType
property var applicationIconSource
......@@ -114,7 +115,10 @@ RowLayout {
var deltaMinutes = Math.floor((Date.now() - time.getTime()) / 1000 / 60);
if (deltaMinutes < 1) {
return "";
// "Just now" is implied by
return notificationHeading.inHistory
? i18ndc("plasma_applet_org.kde.plasma.notifications", "Notification was added less than a minute ago, keep short", "Just now")
: "";
}
// Received less than an hour ago, show relative minutes
......
......@@ -130,6 +130,7 @@ ColumnLayout {
PlasmaCore.ColorScope.inherit: false
inGroup: notificationItem.inGroup
inHistory: notificationItem.inHistory
notificationType: notificationItem.notificationType
jobState: notificationItem.jobState
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment