Feature/request manager make requests abortable (#316)

* Make requests abortable

* Make requests abortable - Fix usage
This commit is contained in:
schroda
2023-05-23 13:27:38 +02:00
committed by GitHub
parent 95ceac335b
commit 0d36d2dcfb
11 changed files with 126 additions and 90 deletions

View File

@@ -153,7 +153,7 @@ const ChapterList: React.FC<IProps> = ({ mangaId }) => {
let actionPromise: Promise<any>;
if (action === 'download') {
actionPromise = requestManager.addChaptersToDownloadQueue(chapterIds);
actionPromise = requestManager.addChaptersToDownloadQueue(chapterIds).response;
} else {
const change: BatchChaptersChange = {};
@@ -165,7 +165,7 @@ const ChapterList: React.FC<IProps> = ({ mangaId }) => {
change.lastPageRead = 0;
}
actionPromise = requestManager.updateChapters(chapterIds, change);
actionPromise = requestManager.updateChapters(chapterIds, change).response;
}
actionPromise