From 41f530c0f63df9173fe926a0490f9f68d1e82f08 Mon Sep 17 00:00:00 2001 From: Scharel Date: Sat, 22 Dec 2018 08:03:15 +0100 Subject: [PATCH] Small changes --- qml/components/NoteDelegateModel.qml | 9 +++++++++ qml/components/NotesApi.qml | 7 ++++--- translations/harbour-nextcloudnotes.ts | 6 +++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/qml/components/NoteDelegateModel.qml b/qml/components/NoteDelegateModel.qml index 240a5b9..ec32261 100644 --- a/qml/components/NoteDelegateModel.qml +++ b/qml/components/NoteDelegateModel.qml @@ -15,6 +15,15 @@ DelegateModel { console.log("API model changed!") reload() } + onNoteCreated: { + console.log("New note created:" + id) + } + onNoteRemoved: { + console.log("Note removed:" + id) + } + onNoteChanged: { + console.log("Note changed:" + id) + } } function reload() { diff --git a/qml/components/NotesApi.qml b/qml/components/NotesApi.qml index 51e5ba9..4535b2b 100644 --- a/qml/components/NotesApi.qml +++ b/qml/components/NotesApi.qml @@ -18,7 +18,8 @@ Item { property var categories: [ ] property string file: StandardPaths.data + "/" + uuid + ".json" property bool saveFile: false - property bool busy: false + property bool busy: jobsRunning > 0 + property int jobsRunning: 0 property int status: 204 property string statusText: "No Content" @@ -73,7 +74,7 @@ Item { } function apiCall(method, data) { - busy = true + jobsRunning++ var endpoint = url if (data) { @@ -156,7 +157,7 @@ Item { else { //console.log("Network error: " + apiReq.statusText + " (" + apiReq.status + ")") } - busy = false + jobsRunning-- } } if (method === "GET") { diff --git a/translations/harbour-nextcloudnotes.ts b/translations/harbour-nextcloudnotes.ts index fd5188a..5b2feae 100644 --- a/translations/harbour-nextcloudnotes.ts +++ b/translations/harbour-nextcloudnotes.ts @@ -262,17 +262,17 @@ NotesApi - + Unable to connect - + Today - + Yesterday