Support deleting multiple volumes, fixes #3737
The UI doesn't seem to update while the VolumeDeleteEvent is send out
This commit is contained in:
parent
4c3dd48147
commit
48e6b5a080
6 changed files with 79 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue