Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/global/Globals.qml
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 153 | function ratePlasmoids() { | |||
---|---|---|---|---|---|
195 | }); | 195 | }); | ||
196 | globals.plasmoids = newPlasmoids; | 196 | globals.plasmoids = newPlasmoids; | ||
197 | } | 197 | } | ||
198 | 198 | | |||
199 | function checkInhibition() { | 199 | function checkInhibition() { | ||
200 | globals.inhibited = Qt.binding(function() { | 200 | globals.inhibited = Qt.binding(function() { | ||
201 | var inhibited = false; | 201 | var inhibited = false; | ||
202 | 202 | | |||
203 | if (!NotificationManager.Server.valid) { | ||||
204 | return false; | ||||
205 | } | ||||
206 | | ||||
203 | var inhibitedUntil = notificationSettings.notificationsInhibitedUntil; | 207 | var inhibitedUntil = notificationSettings.notificationsInhibitedUntil; | ||
204 | if (!isNaN(inhibitedUntil.getTime())) { | 208 | if (!isNaN(inhibitedUntil.getTime())) { | ||
205 | inhibited |= (new Date().getTime() < inhibitedUntil.getTime()); | 209 | inhibited |= (new Date().getTime() < inhibitedUntil.getTime()); | ||
206 | } | 210 | } | ||
207 | 211 | | |||
208 | if (notificationSettings.notificationsInhibitedByApplication) { | 212 | if (notificationSettings.notificationsInhibitedByApplication) { | ||
209 | inhibited |= true; | 213 | inhibited |= true; | ||
210 | } | 214 | } | ||
▲ Show 20 Lines • Show All 301 Lines • Show Last 20 Lines |