Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/main.qml
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 66 | } else { | |||
---|---|---|---|---|---|
73 | 73 | | |||
74 | if (Globals.inhibited) { | 74 | if (Globals.inhibited) { | ||
75 | var inhibitedUntil = notificationSettings.notificationsInhibitedUntil | 75 | var inhibitedUntil = notificationSettings.notificationsInhibitedUntil | ||
76 | var inhibitedUntilValid = !isNaN(inhibitedUntil.getTime()); | 76 | var inhibitedUntilValid = !isNaN(inhibitedUntil.getTime()); | ||
77 | 77 | | |||
78 | // Show until time if valid but not if too far in the future | 78 | // Show until time if valid but not if too far in the future | ||
79 | // TODO check app inhibition, too | 79 | // TODO check app inhibition, too | ||
80 | if (inhibitedUntilValid | 80 | if (inhibitedUntilValid | ||
81 | && inhibitedUntil.getTime() - new Date().getTime() < 365 * 24 * 60 * 60 * 1000 /* 1 year*/) { | 81 | && inhibitedUntil.getTime() - new Date().getTime() < 100 * 24 * 60 * 60 * 1000 /* 100 days*/) { | ||
82 | lines.push(i18n("Do not disturb until %1", | 82 | lines.push(i18n("Do not disturb until %1", | ||
83 | KCoreAddons.Format.formatRelativeDateTime(inhibitedUntil, Locale.ShortFormat))); | 83 | KCoreAddons.Format.formatRelativeDateTime(inhibitedUntil, Locale.ShortFormat))); | ||
84 | } else { | 84 | } else { | ||
85 | lines.push(i18n("Do not disturb")); | 85 | lines.push(i18n("Do not disturb")); | ||
86 | } | 86 | } | ||
87 | } else if (lines.length === 0) { | 87 | } else if (lines.length === 0) { | ||
88 | lines.push(i18n("No unread notifications")); | 88 | lines.push(i18n("No unread notifications")); | ||
89 | } | 89 | } | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |