mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Make album repo optional in remove
Useful when removing data files
This commit is contained in:
parent
b46a2704a3
commit
be8a45751c
1 changed files with 4 additions and 1 deletions
|
@ -14,7 +14,10 @@ class Remove {
|
|||
/// Remove a file
|
||||
Future<void> 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<EventBus>().fire(FileRemovedEvent(account, file));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue