From b8b660db08fe80c08d7fdaaaf49f150b1d2ab474 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Sun, 24 Aug 2025 17:55:17 +0200 Subject: [PATCH] Another possible toast fix --- Modules/Toast/ToastManager.qml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Modules/Toast/ToastManager.qml b/Modules/Toast/ToastManager.qml index ea65b00..8bb8706 100644 --- a/Modules/Toast/ToastManager.qml +++ b/Modules/Toast/ToastManager.qml @@ -17,6 +17,10 @@ Variants { readonly property real scaling: ScalingService.scale(screen) screen: modelData + // Only show on screens that have notifications enabled + visible: modelData ? (Settings.data.notifications.monitors.includes(modelData.name) + || (Settings.data.notifications.monitors.length === 0)) : false + // Position based on bar location, like Notification popup does anchors { top: Settings.data.bar.position === "top" @@ -51,11 +55,15 @@ Variants { hiddenY: Settings.data.bar.position === "top" ? -toast.height - 20 : toast.height + 20 Component.onCompleted: { - // Register this toast with the service - ToastService.allToasts.push(toast) + // Only register toasts for screens that have notifications enabled + if (modelData ? (Settings.data.notifications.monitors.includes(modelData.name) + || (Settings.data.notifications.monitors.length === 0)) : false) { + // Register this toast with the service + ToastService.allToasts.push(toast) - // Connect dismissal signal - toast.dismissed.connect(ToastService.onToastDismissed) + // Connect dismissal signal + toast.dismissed.connect(ToastService.onToastDismissed) + } } } }