Bugfix: Adding notes is possible again
This commit is contained in:
parent
d2449f7591
commit
1396633e34
5 changed files with 8 additions and 5 deletions
|
@ -15,7 +15,7 @@ CoverBackground {
|
|||
CoverAction {
|
||||
iconSource: "image://theme/icon-cover-new"
|
||||
onTriggered: {
|
||||
nextcloudAccounts.itemAt(appSettings.currentAccount).createNote()
|
||||
nextcloudAccounts.itemAt(appSettings.currentAccount).createNote({'content': ""})
|
||||
appWindow.activate()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ Item {
|
|||
break;
|
||||
case "DELETE":
|
||||
console.log("Deleted a note via API: " + endpoint)
|
||||
removeFromModelData(data.id)
|
||||
_removeFromModelData(data.id)
|
||||
break;
|
||||
default:
|
||||
console.log("Unsupported method: " + method)
|
||||
|
@ -199,7 +199,7 @@ Item {
|
|||
function _removeFromModelData(id) {
|
||||
modelData.forEach(function(currentValue, index, array) {
|
||||
if (currentValue.id === id) {
|
||||
modelData.splice(i, 1)
|
||||
modelData.splice(index, 1)
|
||||
}
|
||||
} )
|
||||
_mapDataToModel()
|
||||
|
|
|
@ -40,7 +40,7 @@ Page {
|
|||
text: qsTr("Add note")
|
||||
enabled: nextcloudAccounts.itemAt(appSettings.currentAccount) ? true : false
|
||||
visible: appSettings.currentAccount >= 0
|
||||
onClicked: nextcloudAccounts.itemAt(appSettings.currentAccount).createNote()
|
||||
onClicked: nextcloudAccounts.itemAt(appSettings.currentAccount).createNote({'content': ""})
|
||||
}
|
||||
MenuItem {
|
||||
text: enabled ? qsTr("Reload") : qsTr("Updating...")
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
# * date Author's Name <author's email> version-release
|
||||
# - Summary of changes
|
||||
|
||||
* Tue Dec 04 2018 Scharel Clemens <harbour-nextcloudnotes@scharel.name> 0.1-6
|
||||
- Bugfix: Adding notes is possible again
|
||||
|
||||
* Tue Dec 04 2018 Scharel Clemens <harbour-nextcloudnotes@scharel.name> 0.1-5
|
||||
- Implemented auto prepend for list elements
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Name: harbour-nextcloudnotes
|
||||
Summary: Nextcloud Notes
|
||||
Version: 0.1
|
||||
Release: 5
|
||||
Release: 6
|
||||
# The contents of the Group field should be one of the groups listed here:
|
||||
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
|
||||
Group: Qt/Qt
|
||||
|
|
Loading…
Reference in a new issue