sync changes for note_tree_id and fixed recent notes

This commit is contained in:
azivner
2017-11-18 17:17:46 -05:00
parent 5fb94fcbbd
commit 9a819cafed
6 changed files with 23 additions and 19 deletions

View File

@@ -18,8 +18,11 @@ const recentNotes = (function() {
function addRecentNote(noteTreeId) {
setTimeout(() => {
console.log("note tree: " + noteTreeId);
console.log("current note tree: " + noteTree.getCurrentNoteTreeId());
// we include the note into recent list only if the user stayed on the note at least 5 seconds
if (noteTreeId === noteEditor.getCurrentNoteId()) {
if (noteTreeId === noteTree.getCurrentNoteTreeId()) {
$.ajax({
url: baseApiUrl + 'recent-notes/' + noteTreeId,
type: 'PUT',