Another possible toast fix
This commit is contained in:
parent
e3154fb9a5
commit
b8b660db08
1 changed files with 12 additions and 4 deletions
|
|
@ -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,6 +55,9 @@ Variants {
|
|||
hiddenY: Settings.data.bar.position === "top" ? -toast.height - 20 : toast.height + 20
|
||||
|
||||
Component.onCompleted: {
|
||||
// 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)
|
||||
|
||||
|
|
@ -59,4 +66,5 @@ Variants {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue