Fix/add manga to library without dialog not adding default categories (#632)

* Add default categories when adding manga to library without dialog

* Add manga to library and update categories in one mutation
This commit is contained in:
schroda
2024-03-02 15:26:15 +01:00
committed by GitHub
parent eb233aef3d
commit c5a5c4b8af
6 changed files with 40 additions and 15 deletions

View File

@@ -299,9 +299,11 @@ export class Mangas {
? Mangas.migrateCategories(mangaToMigrateData.manga, mangaToMigrateToData.fetchManga.manga)
: undefined,
!mangaToMigrateToData.fetchManga.manga.inLibrary
? requestManager.updateManga(mangaIdToMigrateTo, { inLibrary: true }).response
? requestManager.updateManga(mangaIdToMigrateTo, { updateManga: { inLibrary: true } }).response
: undefined,
mode === 'migrate'
? requestManager.updateManga(mangaId, { updateManga: { inLibrary: false } }).response
: undefined,
mode === 'migrate' ? requestManager.updateManga(mangaId, { inLibrary: false }).response : undefined,
]);
});
}