diff --git a/qml/pages/EditPage.qml b/qml/pages/EditPage.qml index 057ef75..54755d4 100644 --- a/qml/pages/EditPage.qml +++ b/qml/pages/EditPage.qml @@ -16,7 +16,7 @@ Dialog { property string errorMessage onAccepted: { - notesApi.updateNote(id, { 'category': categoryField.text, 'content': contentArea.text, 'favorite': favoriteButton.selected } ) + notesApi.updateNote(id, { 'category': categoryField.text, 'content': contentArea.text, 'favorite': favoriteButton.selected, 'modified': new Date().valueOf() / 1000 } ) } function reloadContent() { diff --git a/qml/pages/NotePage.qml b/qml/pages/NotePage.qml index 8e58fc7..ded12a2 100644 --- a/qml/pages/NotePage.qml +++ b/qml/pages/NotePage.qml @@ -119,8 +119,8 @@ Dialog { MenuLabel { visible: appSettings.currentAccount.length >= 0 text: qsTr("Last update") + ": " + ( - new Date(notesApi.update).valueOf() !== 0 ? - new Date(notesApi.update).toLocaleString(Qt.locale(), Locale.ShortFormat) : + new Date(account.update).valueOf() !== 0 ? + new Date(account.update).toLocaleString(Qt.locale(), Locale.ShortFormat) : qsTr("never")) } } diff --git a/qml/pages/NotesPage.qml b/qml/pages/NotesPage.qml index dde9c5a..de339c1 100644 --- a/qml/pages/NotesPage.qml +++ b/qml/pages/NotesPage.qml @@ -50,7 +50,7 @@ Page { MenuItem { text: qsTr("Add note") enabled: appSettings.currentAccount.length > 0 - onClicked: notesApi.createNote( { 'content': "" } ) + onClicked: notesApi.createNote( { 'content': "", 'modified': new Date().valueOf() / 1000 } ) } MenuItem { text: enabled ? qsTr("Reload") : qsTr("Updating...")