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

@@ -71,7 +71,7 @@ const ChapterCard: React.FC<IProps> = (props: IProps) => {
[key]: value,
lastPageRead: key === 'read' ? 0 : undefined,
})
.then(() => triggerChaptersUpdate());
.response.then(() => triggerChaptersUpdate());
};
const downloadChapter = () => {
@@ -82,7 +82,7 @@ const ChapterCard: React.FC<IProps> = (props: IProps) => {
const deleteChapter = () => {
requestManager
.removeChapterFromDownloadQueue(chapter.mangaId, chapter.index)
.then(() => triggerChaptersUpdate());
.response.then(() => triggerChaptersUpdate());
handleClose();
};