fix(library): index native completions and refresh background downloads

This commit is contained in:
zarzet committed 2026-09-28 12:13:17 +07:00
1 parent e3bec31b36
commit b15bb2673c
6 files changed
+132 -35

No files matched your search

+7
View File
@@ -394,6 +394,13 @@ class _EagerInitializationState extends ConsumerState<EagerInitialization>
if (state == AppLifecycleState.resumed) {
unawaited(_consumeVerificationNotification());
CoverCacheManager.scheduleMaintenance();
// Native downloads can finish while Flutter is suspended. Refresh the
// persisted history even when no queued item remains to reconcile.
if (ref.exists(downloadHistoryProvider)) {
unawaited(
ref.read(downloadHistoryProvider.notifier).reloadFromStorage(),
);
}
_maybeAutoScanLocalLibrary();
if (ref.exists(localLibraryProvider)) {
unawaited(