diff --git a/lib/use_case/remove.dart b/lib/use_case/remove.dart index ff1b4262..87f1247a 100644 --- a/lib/use_case/remove.dart +++ b/lib/use_case/remove.dart @@ -14,7 +14,10 @@ class Remove { /// Remove a file Future call(Account account, File file) async { await fileRepo.remove(account, file); - await _cleanUpAlbums(account, file); + if (albumRepo != null) { + _log.info("[call] Skip albums cleanup as albumRepo == null"); + await _cleanUpAlbums(account, file); + } KiwiContainer().resolve().fire(FileRemovedEvent(account, file)); }