Fix manga details not updating after refresh with partial data

Regression 0ed2e7c193
This commit is contained in:
schroda
2026-05-02 14:40:10 +02:00
parent 5485f2bb0f
commit c068f2fb35
3 changed files with 15 additions and 6 deletions

View File

@@ -19,14 +19,22 @@ export const useRefreshManga = (mangaId: string) => {
setFetchingOnline(true);
setError(null);
try {
await requestManager.refreshManga(mangaId, { awaitRefetchQueries: true }).response;
} catch (e) {
const handleError = (e: unknown) => {
if (CombinedGraphQLErrors.is(e) && baseCleanup(e.message) === 'no chapters found') {
return;
}
setError(e);
};
try {
const { error: tmpError } = await requestManager.refreshManga(mangaId, {
awaitRefetchQueries: true,
}).response;
handleError(tmpError);
} catch (e) {
handleError(e);
} finally {
setFetchingOnline(false);
}

View File

@@ -700,8 +700,9 @@ export class MigrationManager {
return (async () => {
try {
const updatedMatch = await requestManager.refreshManga(match.id, { awaitRefetchQueries: true })
.response;
const updatedMatch = await requestManager.refreshManga(match.id, {
awaitRefetchQueries: true,
}).response;
return updatedMatch.data?.fetchManga?.manga ?? match;
} catch (e) {