diff --git a/app/lib/bloc/list_importable_album.dart b/app/lib/bloc/list_importable_album.dart index b44cac46..e36b882b 100644 --- a/app/lib/bloc/list_importable_album.dart +++ b/app/lib/bloc/list_importable_album.dart @@ -131,7 +131,7 @@ class ListImportableAlbumBloc products.add(ev); // don't emit events too frequently if (++count >= 5) { - emit(ListImportableAlbumBlocLoading(products)); + emit(ListImportableAlbumBlocLoading(products.toList())); } } } diff --git a/app/lib/bloc/scan_account_dir.dart b/app/lib/bloc/scan_account_dir.dart index f0b7b8c9..48e7c9f5 100644 --- a/app/lib/bloc/scan_account_dir.dart +++ b/app/lib/bloc/scan_account_dir.dart @@ -386,7 +386,7 @@ class ScanAccountDirBloc files.addAll(event); if (cache.isEmpty) { // only emit partial results if there's no cache - emit(ScanAccountDirBlocLoading(files)); + emit(ScanAccountDirBlocLoading(files.toList())); } } _log.info( diff --git a/app/lib/bloc/scan_local_dir.dart b/app/lib/bloc/scan_local_dir.dart index 8d092b22..eb6b83df 100644 --- a/app/lib/bloc/scan_local_dir.dart +++ b/app/lib/bloc/scan_local_dir.dart @@ -93,7 +93,7 @@ class ScanLocalDirBloc final products = []; for (final p in event.relativePaths) { if (shouldEmitIntermediate) { - emit(ScanLocalDirBlocLoading(products)); + emit(ScanLocalDirBlocLoading(products.toList())); } final files = await ScanLocalDir(c)(p); products.addAll(files);