mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-08 18:28:53 +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
|
/// Remove a file
|
||||||
Future<void> call(Account account, File file) async {
|
Future<void> call(Account account, File file) async {
|
||||||
await fileRepo.remove(account, file);
|
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));
|
KiwiContainer().resolve<EventBus>().fire(FileRemovedEvent(account, file));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue