Bulk Actions for Reading Lists (#3035)

This commit is contained in:
Joe Milazzo 2024-07-02 19:00:23 -05:00 committed by GitHub
parent 1918c9305e
commit 6434ed7c9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 965 additions and 16 deletions

View file

@ -4,7 +4,7 @@ import {ReplaySubject} from 'rxjs';
import {filter} from 'rxjs/operators';
import {Action, ActionFactoryService, ActionItem} from '../_services/action-factory.service';
type DataSource = 'volume' | 'chapter' | 'special' | 'series' | 'bookmark' | 'sideNavStream' | 'collection';
type DataSource = 'volume' | 'chapter' | 'special' | 'series' | 'bookmark' | 'sideNavStream' | 'collection' | 'readingList';
/**
* Responsible for handling selections on cards. Can handle multiple card sources next to each other in different loops.
@ -159,6 +159,10 @@ export class BulkSelectionService {
return this.applyFilterToList(this.actionFactory.getCollectionTagActions(callback), [Action.Promote, Action.UnPromote, Action.Delete]);
}
if (Object.keys(this.selectedCards).filter(item => item === 'readingList').length > 0) {
return this.applyFilterToList(this.actionFactory.getReadingListActions(callback), [Action.Promote, Action.UnPromote, Action.Delete]);
}
return this.applyFilterToList(this.actionFactory.getVolumeActions(callback), allowedActions);
}