1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Fixed various issue in RN app

This commit is contained in:
Laurent Cozic
2017-07-17 21:22:05 +01:00
parent 58fa4a69b0
commit ca68b85837
10 changed files with 51 additions and 8 deletions

View File

@@ -211,6 +211,17 @@ class Note extends BaseItem {
});
}
static async toggleIsTodo(noteId) {
let note = await Note.load(noteId);
const isTodo = !note.is_todo ? 1 : 0;
note.is_todo = isTodo;
if (!note.is_todo) {
note.todo_due = 0;
note.todo_completed = 0;
}
return note;
}
static async duplicate(noteId, options = null) {
const changes = options && options.changes;