mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
fix for note duplication in recent notes
This commit is contained in:
@@ -139,7 +139,7 @@ function createNote(node, parentKey, target) {
|
||||
});
|
||||
}
|
||||
|
||||
recentNotes = [];
|
||||
globalRecentNotes = [];
|
||||
|
||||
function setNoteBackgroundIfEncrypted(note) {
|
||||
if (note.detail.encryption > 0) {
|
||||
@@ -232,9 +232,9 @@ function addRecentNote(noteTreeId, noteContentId) {
|
||||
// we include the note into recent list only if the user stayed on the note at least 5 seconds
|
||||
if (noteTreeId === globalNote.detail.note_id || noteContentId === globalNote.detail.note_id) {
|
||||
// if it's already there, remove the note
|
||||
c = recentNotes.filter(note => note !== noteTreeId);
|
||||
globalRecentNotes = globalRecentNotes.filter(note => note !== noteTreeId);
|
||||
|
||||
recentNotes.unshift(noteTreeId);
|
||||
globalRecentNotes.unshift(noteTreeId);
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user