fix: notif fileview warnings on first launch
This commit is contained in:
parent
8fbf85da86
commit
e3b3a66877
1 changed files with 2 additions and 1 deletions
|
|
@ -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("[]"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue