mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
sync changes for note_tree_id and fixed recent notes
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -317,7 +317,7 @@ const noteTree = (function() {
|
||||
|
||||
function getCurrentNoteTreeId() {
|
||||
const node = getCurrentNode();
|
||||
return node.note_tree_id;
|
||||
return node.data.note_tree_id;
|
||||
}
|
||||
|
||||
function setCurrentNoteTreeBasedOnProtectedStatus() {
|
||||
|
||||
Reference in New Issue
Block a user