Feature/release cleanup (#597)

* Deselect all after bulk operations complete.

* Implemented a way to trigger selection code on mobile.

* When selection mode is active, make the clickable area the whole image.

* Series detail shouldn't use gutters for card layout as it can cause skewing on mobile

* Long press on card items to trigger the selection on mobile

* Code cleanup

* One more

* Misread the code issue
This commit is contained in:
Joseph Milazzo 2021-09-26 05:40:52 -07:00 committed by GitHub
parent 5ceb74e210
commit 5e2606b0de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 54 additions and 25 deletions

View file

@ -33,30 +33,26 @@ export class LibraryDetailComponent implements OnInit {
};
bulkActionCallback = (action: Action, data: any) => {
console.log('handling bulk action callback');
// we need to figure out what is actually selected now
const selectedSeriesIndexies = this.bulkSelectionService.getSelectedCardsForSource('series');
const selectedSeries = this.series.filter((series, index: number) => selectedSeriesIndexies.includes(index + ''));
switch (action) {
case Action.AddToReadingList:
this.actionService.addMultipleSeriesToReadingList(selectedSeries);
this.actionService.addMultipleSeriesToReadingList(selectedSeries, () => {
this.bulkSelectionService.deselectAll();
});
break;
case Action.MarkAsRead:
console.log('marking series as read: ', selectedSeries)
this.actionService.markMultipleSeriesAsRead(selectedSeries, () => {
this.loadPage();
this.bulkSelectionService.deselectAll();
});
break;
case Action.MarkAsUnread:
//console.log('marking volumes as unread: ', selectedVolumeIds)
//console.log('marking chapters as unread: ', chapters)
this.actionService.markMultipleSeriesAsUnread(selectedSeries, () => {
this.loadPage();
this.bulkSelectionService.deselectAll();
});
break;
}