Commit f4b6c0d6 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Refactor to if condition for notification timeout

Makes it more readable
parent c83cfd2f
......@@ -141,8 +141,24 @@ PlasmaCore.Dialog {
Timer {
id: timer
interval: notificationPopup.effectiveTimeout
running: notificationPopup.visible && !area.containsMouse && interval > 0
&& !notificationItem.dragging && !notificationItem.menuOpen && !notificationItem.replying
running: {
if (!notificationPopup.visible) {
return false;
}
if (area.containsMouse) {
return false;
}
if (interval <= 0) {
return false;
}
if (notificationItem.dragging || notificationItem.menuOpen) {
return false;
}
if (notificationItem.replying) {
return false;
}
return true;
}
onTriggered: {
if (notificationPopup.dismissTimeout) {
notificationPopup.dismissClicked();
......
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