mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-02 22:26:52 +02:00
feat(album): replace selection sharing with metadata re-enrichment
This commit is contained in:
1 parent
ce13e29b71
commit
eed56d4cbb
3 files changed
+292
-47
No files matched your search
@@ -145,6 +145,7 @@ Future<void> reEnrichLocalTracks(
|
||||
required Future<void> Function() onSelectionHide,
|
||||
required VoidCallback onSelectionRestore,
|
||||
required VoidCallback onComplete,
|
||||
Future<void> Function()? refreshLibrary,
|
||||
}) async {
|
||||
if (selected.isEmpty) return;
|
||||
// Capture a stable route context before a caller removes its overlay.
|
||||
@@ -243,14 +244,18 @@ Future<void> reEnrichLocalTracks(
|
||||
if (!context.mounted || !isActive()) return;
|
||||
if (!cancelled) BatchProgressDialog.dismiss(context);
|
||||
|
||||
try {
|
||||
if (!ref.read(localLibraryProvider).isScanning) {
|
||||
await ref.read(localLibraryProvider.notifier).scanAllSources();
|
||||
} else {
|
||||
if (refreshLibrary != null) {
|
||||
await refreshLibrary();
|
||||
} else {
|
||||
try {
|
||||
if (!ref.read(localLibraryProvider).isScanning) {
|
||||
await ref.read(localLibraryProvider.notifier).scanAllSources();
|
||||
} else {
|
||||
await ref.read(localLibraryProvider.notifier).reloadFromStorage();
|
||||
}
|
||||
} catch (_) {
|
||||
await ref.read(localLibraryProvider.notifier).reloadFromStorage();
|
||||
}
|
||||
} catch (_) {
|
||||
await ref.read(localLibraryProvider.notifier).reloadFromStorage();
|
||||
}
|
||||
|
||||
if (!context.mounted || !isActive()) return;
|
||||
|
||||
Reference in new issue
Block a user