diff --git a/lib/core/notes_cache.dart b/lib/core/notes_cache.dart index ec3b7039..397ff559 100644 --- a/lib/core/notes_cache.dart +++ b/lib/core/notes_cache.dart @@ -85,7 +85,9 @@ class NotesCache { var heap = HeapPriorityQueue(reversedFn); for (var note in allNotes) { - heap.add(note); + if (!heap.contains(note)) { + heap.add(note); + } if (heap.length > CACHE_SIZE) { heap.removeFirst(); }