fix: notif fileview warnings on first launch

This commit is contained in:
2 * r + 2 * t 2026-04-09 21:56:51 +10:00
parent 8fbf85da86
commit e3b3a66877

View file

@ -105,6 +105,7 @@ Singleton {
FileView { FileView {
id: storage id: storage
printErrors: false
path: `${Paths.state}/notifs.json` path: `${Paths.state}/notifs.json`
onLoaded: { onLoaded: {
const data = JSON.parse(text()); const data = JSON.parse(text());
@ -116,7 +117,7 @@ Singleton {
onLoadFailed: err => { onLoadFailed: err => {
if (err === FileViewError.FileNotFound) { if (err === FileViewError.FileNotFound) {
root.loaded = true; root.loaded = true;
setText("[]"); Qt.callLater(() => setText("[]"));
} }
} }
} }