From 2016793b97ec301b36ad17883d192a006427e359 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 27 Dec 2020 10:34:16 +0100 Subject: [PATCH] NotesCache: Print logs of how many items are saved / loaded --- lib/core/notes_cache.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core/notes_cache.dart b/lib/core/notes_cache.dart index 03415e4f..bba658ec 100644 --- a/lib/core/notes_cache.dart +++ b/lib/core/notes_cache.dart @@ -30,6 +30,7 @@ class NotesCache { Future load(NotesFolderFS rootFolder) async { if (!enabled) return; var fileList = await loadFromDisk(); + Log.i("Notes Cache Loaded: ${fileList.length} items"); var sep = Platform.pathSeparator; var notesBasePath = this.notesBasePath; @@ -74,12 +75,12 @@ class NotesCache { Future buildCache(NotesFolderFS rootFolder) async { if (!enabled) return; - Log.d("Saving the NotesCache"); - var notes = rootFolder.getAllNotes(); var sortingMode = rootFolder.config.sortingMode; var fileList = _fetchFirst10(notes, sortingMode).map((f) => f.filePath).toList(); + + Log.i("Notes Cache saving: ${fileList.length} items"); return saveToDisk(fileList); }