quickshell: hide toast instantly when popup opens

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-06-11 15:20:17 +01:00
parent 991f3734aa
commit fc0c163b0b

View file

@ -1752,7 +1752,7 @@ in
viewMonth = clockText.now.getMonth(); viewMonth = clockText.now.getMonth();
// Runs on every open: an on-screen toast is redundant // Runs on every open: an on-screen toast is redundant
// once the notification list is visible. // once the notification list is visible.
if (toastItem.visible) toastItem.dismiss(); if (toastItem.visible) toastItem.hideNow();
} }
function shiftMonth(d) { function shiftMonth(d) {
let m = viewMonth + d; let m = viewMonth + d;
@ -2325,6 +2325,14 @@ in
_toastCloseDelay.start(); _toastCloseDelay.start();
} }
// Instant hide, no close animation
function hideNow() {
_toastTimer.stop();
_toastCloseDelay.stop();
toastOpen = false;
visible = false;
}
Timer { Timer {
id: _toastTimer id: _toastTimer
interval: 5000 interval: 5000