Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/main.qml
Show All 32 Lines | |||||
33 | 33 | | |||
34 | Item { | 34 | Item { | ||
35 | id: root | 35 | id: root | ||
36 | 36 | | |||
37 | readonly property int effectiveStatus: historyModel.activeJobsCount > 0 | 37 | readonly property int effectiveStatus: historyModel.activeJobsCount > 0 | ||
38 | || historyModel.unreadNotificationsCount > 0 | 38 | || historyModel.unreadNotificationsCount > 0 | ||
39 | || Globals.inhibited ? PlasmaCore.Types.ActiveStatus | 39 | || Globals.inhibited ? PlasmaCore.Types.ActiveStatus | ||
40 | : PlasmaCore.Types.PassiveStatus | 40 | : PlasmaCore.Types.PassiveStatus | ||
41 | onEffectiveStatusChanged: { | 41 | function onEffectiveStatusChanged() { | ||
42 | if (effectiveStatus === PlasmaCore.Types.PassiveStatus) { | 42 | if (effectiveStatus === PlasmaCore.Types.PassiveStatus) { | ||
43 | // HACK System Tray only lets applets self-hide when in Active state | 43 | // HACK System Tray only lets applets self-hide when in Active state | ||
44 | // When we clear the notifications, the status is updated right away | 44 | // When we clear the notifications, the status is updated right away | ||
45 | // as a result of model signals, and when we then try to collapse | 45 | // as a result of model signals, and when we then try to collapse | ||
46 | // the popup isn't hidden. | 46 | // the popup isn't hidden. | ||
47 | Qt.callLater(function() { | 47 | Qt.callLater(function() { | ||
48 | Plasmoid.status = effectiveStatus; | 48 | Plasmoid.status = effectiveStatus; | ||
49 | }); | 49 | }); | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |