mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-04 09:10:48 +02:00
perf(library): optimize CIFS scan recovery
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user