forked from Shinonome/dots-hyprland
notifications: hover prevents timeout
This commit is contained in:
@@ -10,7 +10,7 @@ import Quickshell
|
||||
* A group of notifications from the same app.
|
||||
* Similar to Android's notifications
|
||||
*/
|
||||
Item { // Notification group area
|
||||
MouseArea { // Notification group area
|
||||
id: root
|
||||
property var notificationGroup
|
||||
property var notifications: notificationGroup?.notifications ?? []
|
||||
@@ -38,6 +38,17 @@ Item { // Notification group area
|
||||
destroyAnimation.running = true;
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
onContainsMouseChanged: {
|
||||
if (!root.popup) return;
|
||||
if (root.containsMouse) root.notifications.forEach(notif => {
|
||||
Notifications.cancelTimeout(notif.notificationId);
|
||||
});
|
||||
else root.notifications.forEach(notif => {
|
||||
Notifications.timeoutNotification(notif.notificationId);
|
||||
});
|
||||
}
|
||||
|
||||
SequentialAnimation { // Drag finish animation
|
||||
id: destroyAnimation
|
||||
running: false
|
||||
|
||||
Reference in New Issue
Block a user