Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
f4b6c0d6
Commit
f4b6c0d6
authored
Mar 26, 2021
by
Kai Uwe Broulik
🍇
Browse files
[Notifications] Refactor to if condition for notification timeout
Makes it more readable
parent
c83cfd2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/notifications/package/contents/ui/NotificationPopup.qml
View file @
f4b6c0d6
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment