Support deleting multiple volumes, fixes #3737

The UI doesn't seem to update while the VolumeDeleteEvent is send out
This commit is contained in:
Amelia 2025-04-16 21:24:47 +02:00
parent 4c3dd48147
commit 48e6b5a080
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
6 changed files with 79 additions and 8 deletions

View file

@ -472,8 +472,18 @@ export class ActionService {
});
}
async deleteMultipleVolumes(volumes: Array<Volume>, callback?: BooleanActionCallback) {
if (!await this.confirmService.confirm(translate('toasts.confirm-delete-multiple-volumes', {count: volumes.length}))) return;
this.volumeService.deleteMultipleVolumes(volumes.map(v => v.id)).subscribe((success) => {
if (callback) {
callback(success);
}
})
}
async deleteMultipleChapters(seriesId: number, chapterIds: Array<Chapter>, callback?: BooleanActionCallback) {
if (!await this.confirmService.confirm(translate('toasts.confirm-delete-multiple-chapters'))) return;
if (!await this.confirmService.confirm(translate('toasts.confirm-delete-multiple-chapters', {count: chapterIds.length}))) return;
this.chapterService.deleteMultipleChapters(seriesId, chapterIds.map(c => c.id)).subscribe(() => {
if (callback) {