mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-18 03:10:28 +08:00
NotesCache: Print logs of how many items are saved / loaded
This commit is contained in:
@ -30,6 +30,7 @@ class NotesCache {
|
|||||||
Future load(NotesFolderFS rootFolder) async {
|
Future load(NotesFolderFS rootFolder) async {
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
var fileList = await loadFromDisk();
|
var fileList = await loadFromDisk();
|
||||||
|
Log.i("Notes Cache Loaded: ${fileList.length} items");
|
||||||
|
|
||||||
var sep = Platform.pathSeparator;
|
var sep = Platform.pathSeparator;
|
||||||
var notesBasePath = this.notesBasePath;
|
var notesBasePath = this.notesBasePath;
|
||||||
@ -74,12 +75,12 @@ class NotesCache {
|
|||||||
Future<void> buildCache(NotesFolderFS rootFolder) async {
|
Future<void> buildCache(NotesFolderFS rootFolder) async {
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
|
|
||||||
Log.d("Saving the NotesCache");
|
|
||||||
|
|
||||||
var notes = rootFolder.getAllNotes();
|
var notes = rootFolder.getAllNotes();
|
||||||
var sortingMode = rootFolder.config.sortingMode;
|
var sortingMode = rootFolder.config.sortingMode;
|
||||||
var fileList =
|
var fileList =
|
||||||
_fetchFirst10(notes, sortingMode).map((f) => f.filePath).toList();
|
_fetchFirst10(notes, sortingMode).map((f) => f.filePath).toList();
|
||||||
|
|
||||||
|
Log.i("Notes Cache saving: ${fileList.length} items");
|
||||||
return saveToDisk(fileList);
|
return saveToDisk(fileList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user