Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationHeader.qml
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 104 | function generateAgoText() { | |||
---|---|---|---|---|---|
122 | } | 122 | } | ||
123 | 123 | | |||
124 | // Otherwise show relative date (Yesterday, "Last Sunday", or just date if too far in the past) | 124 | // Otherwise show relative date (Yesterday, "Last Sunday", or just date if too far in the past) | ||
125 | return KCoreAddons.Format.formatRelativeDate(time, Locale.ShortFormat); | 125 | return KCoreAddons.Format.formatRelativeDate(time, Locale.ShortFormat); | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | function generateRemainingText() { | 128 | function generateRemainingText() { | ||
129 | if (notificationHeading.notificationType !== NotificationManager.Notifications.JobType | 129 | if (notificationHeading.notificationType !== NotificationManager.Notifications.JobType | ||
130 | || notificationHeading.jobState === NotificationManager.Notifications.JobStateStopped) { | 130 | || notificationHeading.jobState !== NotificationManager.Notifications.JobStateRunning) { | ||
131 | return ""; | 131 | return ""; | ||
132 | } | 132 | } | ||
133 | 133 | | |||
134 | var details = notificationHeading.jobDetails; | 134 | var details = notificationHeading.jobDetails; | ||
135 | if (!details || !details.speed) { | 135 | if (!details || !details.speed) { | ||
136 | return ""; | 136 | return ""; | ||
137 | } | 137 | } | ||
138 | 138 | | |||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |