From 967bb03aee29c516bd7492f3b30dab0cc3a12821 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Tue, 16 Aug 2022 22:35:35 +0800 Subject: [PATCH] Fix ResyncAlbum breaks when a file got no fileid --- app/lib/use_case/resync_album.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/use_case/resync_album.dart b/app/lib/use_case/resync_album.dart index f3f1ed5f..9c20ef01 100644 --- a/app/lib/use_case/resync_album.dart +++ b/app/lib/use_case/resync_album.dart @@ -1,3 +1,4 @@ +import 'package:collection/collection.dart'; import 'package:logging/logging.dart'; import 'package:nc_photos/account.dart'; import 'package:nc_photos/debug_util.dart'; @@ -25,7 +26,11 @@ class ResyncAlbum { final files = await FindFile(_c)( account, - items.whereType().map((i) => i.file.fileId!).toList(), + items + .whereType() + .map((i) => i.file.fileId) + .whereNotNull() + .toList(), onFileNotFound: (_) {}, ); final fileIt = files.iterator;