quickshell: keep notification sound while popup open; opening popup dismisses toast
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
2fcbc6865e
commit
991f3734aa
1 changed files with 13 additions and 4 deletions
|
|
@ -1750,6 +1750,9 @@ in
|
|||
function resetView() {
|
||||
viewYear = clockText.now.getFullYear();
|
||||
viewMonth = clockText.now.getMonth();
|
||||
// Runs on every open: an on-screen toast is redundant
|
||||
// once the notification list is visible.
|
||||
if (toastItem.visible) toastItem.dismiss();
|
||||
}
|
||||
function shiftMonth(d) {
|
||||
let m = viewMonth + d;
|
||||
|
|
@ -2293,11 +2296,17 @@ in
|
|||
Connections {
|
||||
target: bar.shellRoot
|
||||
function onNotificationReceived() {
|
||||
// No toast while the calendar popup is open — the
|
||||
// notification list is already on screen there.
|
||||
if (toastItem.isPrimary && !calPopup.visible) {
|
||||
toastItem.showToast(bar.shellRoot.latestNotification);
|
||||
if (!toastItem.isPrimary) return;
|
||||
let n = bar.shellRoot.latestNotification;
|
||||
// Popup open: the notification list is already on
|
||||
// screen — play the sound but skip the toast.
|
||||
if (calPopup.visible) {
|
||||
if (!toastItem.mutedApps.includes(n.appName)) {
|
||||
notifSoundProc.running = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
toastItem.showToast(n);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue