after creating new note, unselect previous active, fixes #45

This commit is contained in:
azivner 2018-02-13 23:25:28 -05:00
parent 5bce9a5f94
commit ebe66eaed9
2 changed files with 3 additions and 3 deletions

View File

@ -805,6 +805,8 @@ const noteTree = (function() {
throwError("Unrecognized target: " + target); throwError("Unrecognized target: " + target);
} }
clearSelectedNodes(); // to unmark previously active node
showMessage("Created!"); showMessage("Created!");
} }

View File

@ -61,10 +61,8 @@ router.put('/:noteTreeId/move-before/:beforeNoteTreeId', auth.checkApiAuth, wrap
await sync_table.addNoteReorderingSync(beforeNote.parentNoteId, sourceId); await sync_table.addNoteReorderingSync(beforeNote.parentNoteId, sourceId);
const now = utils.nowDate();
await sql.execute("UPDATE note_tree SET parentNoteId = ?, notePosition = ?, dateModified = ? WHERE noteTreeId = ?", await sql.execute("UPDATE note_tree SET parentNoteId = ?, notePosition = ?, dateModified = ? WHERE noteTreeId = ?",
[beforeNote.parentNoteId, beforeNote.notePosition, now, noteTreeId]); [beforeNote.parentNoteId, beforeNote.notePosition, utils.nowDate(), noteTreeId]);
await sync_table.addNoteTreeSync(noteTreeId, sourceId); await sync_table.addNoteTreeSync(noteTreeId, sourceId);
}); });