test notif plugin #51

Merged
zach merged 2 commits from notif-plugin into main 2026-04-12 22:04:23 +02:00
2 changed files with 10 additions and 9 deletions
Showing only changes of commit 585128c447 - Show all commits
@@ -13,7 +13,7 @@ LazyListView {
required property Flickable container required property Flickable container
required property Props props required property Props props
required property DrawerVisibilities visibilities required property PersistentProperties visibilities
anchors.left: parent?.left anchors.left: parent?.left
anchors.right: parent?.right anchors.right: parent?.right
@@ -107,7 +107,7 @@ LazyListView {
triggeredOnStart: true triggeredOnStart: true
onTriggered: { onTriggered: {
const notifs = Notifs.notClosed.filter(n => n.appName === notif.modelData); const notifs = NotifServer.notClosed.filter(n => n.appName === notif.modelData);
if (notifs.length === 0) { if (notifs.length === 0) {
stop(); stop();
return; return;
@@ -131,9 +131,9 @@ LazyListView {
model: ScriptModel { model: ScriptModel {
values: { values: {
const map = new Map(); const map = new Map();
for (const n of Notifs.notClosed) for (const n of NotifServer.notClosed)
map.set(n.appName, null); map.set(n.appName, null);
for (const n of Notifs.list) for (const n of NotifServer.list)
map.set(n.appName, null); map.set(n.appName, null);
return [...map.keys()]; return [...map.keys()];
} }
@@ -1,12 +1,13 @@
pragma ComponentBehavior: Bound pragma ComponentBehavior: Bound
import Quickshell
import QtQuick
import QtQuick.Layouts
import ZShell.Components
import qs.Components import qs.Components
import qs.Config import qs.Config
import qs.Modules import qs.Modules
import qs.Daemons import qs.Daemons
import Quickshell
import QtQuick
import QtQuick.Layouts
LazyListView { LazyListView {
id: root id: root
@@ -15,7 +16,7 @@ LazyListView {
required property bool expanded required property bool expanded
required property list<var> notifs required property list<var> notifs
required property Props props required property Props props
required property DrawerVisibilities visibilities required property PersistentProperties visibilities
signal requestToggleExpand(expand: bool) signal requestToggleExpand(expand: bool)
@@ -37,7 +38,7 @@ LazyListView {
id: notif id: notif
required property int index required property int index
required property NotifData modelData required property NotifServer.Notif modelData
property int startY property int startY
LazyListView.preferredHeight: modelData?.closed || LazyListView.removing ? 0 : notifInner.nonAnimHeight LazyListView.preferredHeight: modelData?.closed || LazyListView.removing ? 0 : notifInner.nonAnimHeight