notifs: persist time

This commit is contained in:
2 * r + 2 * t 2025-09-19 22:51:01 +10:00
parent eab211b289
commit 3fb78654a2

View file

@ -23,6 +23,7 @@ Singleton {
return; return;
storage.setText(JSON.stringify(list.filter(n => !n.closed).map(n => ({ storage.setText(JSON.stringify(list.filter(n => !n.closed).map(n => ({
time: n.time,
id: n.id, id: n.id,
summary: n.summary, summary: n.summary,
body: n.body, body: n.body,
@ -150,10 +151,10 @@ Singleton {
property bool resident: notification?.resident ?? false property bool resident: notification?.resident ?? false
property bool hasActionIcons: notification?.hasActionIcons ?? false property bool hasActionIcons: notification?.hasActionIcons ?? false
property list<var> actions: notification?.actions.map(a => ({ property list<var> actions: notification?.actions.map(a => ({
identifier: a.identifier, identifier: a.identifier,
text: a.text, text: a.text,
invoke: () => a.invoke() invoke: () => a.invoke()
})) ?? [] })) ?? []
readonly property Timer timer: Timer { readonly property Timer timer: Timer {
running: true running: true