Send Non books to your Devices (#1691)

* Only restrict non-epub/pdf for Kindle devices on Send To.

* Removed restriction to email non-epub/pdfs to devices.
This commit is contained in:
Joe Milazzo 2022-12-11 09:55:59 -06:00 committed by GitHub
parent ee5ea708d9
commit b672cf545d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 81 additions and 20 deletions

View file

@ -174,10 +174,10 @@ export class ActionFactoryService {
dummyCallback(action: ActionItem<any>, data: any) {}
filterSendToAction(actions: Array<ActionItem<Chapter>>, chapter: Chapter) {
if (chapter.files.filter(f => f.format === MangaFormat.EPUB || f.format === MangaFormat.PDF).length !== chapter.files.length) {
// Remove Send To as it doesn't apply
return actions.filter(item => item.title !== 'Send To');
}
// if (chapter.files.filter(f => f.format === MangaFormat.EPUB || f.format === MangaFormat.PDF).length !== chapter.files.length) {
// // Remove Send To as it doesn't apply
// return actions.filter(item => item.title !== 'Send To');
// }
return actions;
}

View file

@ -319,9 +319,9 @@ export class CardItemComponent implements OnInit, OnDestroy {
this.actions = this.actionFactoryService.filterSendToAction(this.actions, vol.chapters[0]);
} else if (this.utilityService.isSeries(this.entity)) {
const series = (this.entity as Series);
if (series.format === MangaFormat.EPUB || series.format === MangaFormat.PDF) {
this.actions = this.actions.filter(a => a.title !== 'Send To');
}
// if (series.format === MangaFormat.EPUB || series.format === MangaFormat.PDF) {
// this.actions = this.actions.filter(a => a.title !== 'Send To');
// }
}
}
}