diff --git a/modules/NotifPopup.qml b/modules/NotifPopup.qml index 0720c85..787d5a4 100644 --- a/modules/NotifPopup.qml +++ b/modules/NotifPopup.qml @@ -63,6 +63,14 @@ PanelWindow { _entered = true; } + Connections { + target: M.NotifService + function onPopupExpiring(notifId) { + if (notifId === popupItem.modelData.id) + popupItem.animateDismiss(false); + } + } + Behavior on y { enabled: popupItem._entered NumberAnimation { diff --git a/modules/NotifService.qml b/modules/NotifService.qml index 8a92589..62f197c 100644 --- a/modules/NotifService.qml +++ b/modules/NotifService.qml @@ -105,12 +105,15 @@ QtObject { } } + // Signal popups to animate out before removal + signal popupExpiring(var notifId) + property Component _expireTimer: Component { Timer { property var _notifId running: true onTriggered: { - root.dismissPopup(_notifId); + root.popupExpiring(_notifId); destroy(); } }