perf(library): optimize CIFS scan recovery

This commit is contained in:
zarzet
2026-09-01 12:00:37 +07:00
parent 0d148113f0
commit 4ba3ab2fc7
5 changed files with 227 additions and 55 deletions
+7
View File
@@ -357,6 +357,13 @@ class _EagerInitializationState extends ConsumerState<_EagerInitialization>
final now = DateTime.now();
final prefs = await SharedPreferences.getInstance();
final pendingSourceId = prefs.getString(localLibraryActiveScanSourceKey);
if (pendingSourceId != null && pendingSourceId.trim().isNotEmpty) {
await ref
.read(localLibraryProvider.notifier)
.startSourceScan(pendingSourceId.trim());
return;
}
final lastScanned = readLocalLibraryLastScannedAt(prefs);
if (lastScanned != null) {