Merge pull request #2287 from tmarti2/fix-toast-selected-screen

Fix Toast: same model than Notifications
This commit is contained in:
Lysec
2026-03-24 12:32:46 +01:00
committed by GitHub
+8 -1
View File
@@ -6,7 +6,14 @@ import qs.Commons
import qs.Widgets
Variants {
model: Quickshell.screens.filter(screen => (Settings.data.notifications.monitors.includes(screen.name) || (Settings.data.notifications.monitors.length === 0)))
model: {
const screens = Quickshell.screens.filter(screen => Settings.data.notifications.monitors.includes(screen.name));
// Empty list can mean two things :
// - No (visible) notification display activated in settings
// - One or more (not visible) displays are activated but unplugged
// In both cases we fallback to show notification on all screens
return screens.length === 0 ? Quickshell.screens : screens;
}
delegate: ToastScreen {
required property ShellScreen modelData