Fix retrying failed migration search

This commit is contained in:
schroda
2026-05-22 15:46:58 +02:00
parent a876879d0e
commit acf5e2630b
3 changed files with 19 additions and 18 deletions

View File

@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Migration**) Fix being able to start search without selected destination sources
- (**Migration**) Fix search hotkey (ctrl+f) in the single manga migration search page not focusing the search textfield
- (**Migration**) Fix missing manual search option for in progress entry search without a selected match on mobile
- (**Migration**) Fix being unable to retry failed search for a match without a selected match
- (**Reader**) Fix scrollbar appearing with "fit to widt/height/screen" page scale mode and applied safe area insets
- (**Reader**) Fix wrongly positioned mobile progress bar current page indicator
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled

View File

@@ -1153,6 +1153,9 @@ export class MigrationManager {
if (MigrationEntries.hasStatus(entry, MigrationEntryStatus.SEARCH_FAILED)) {
MigrationManager.updateState((draft) => {
const draftEntry = draft.entries[id];
draftEntry.status = MigrationEntryStatus.SEARCH_PENDING;
draftEntry.error = undefined;
draft.searchProgress.completed -= 1;
draft.searchProgress.failed -= 1;
});
@@ -1168,6 +1171,9 @@ export class MigrationManager {
if (MigrationEntries.hasStatus(entry, MigrationEntryStatus.MIGRATION_FAILED)) {
MigrationManager.updateState((draft) => {
const draftEntry = draft.entries[id];
draftEntry.status = MigrationEntryStatus.MIGRATION_PENDING;
draftEntry.error = undefined;
draft.migrationProgress.completed -= 1;
draft.migrationProgress.failed -= 1;
});

View File

@@ -72,11 +72,9 @@ const EntryError = ({
id,
title,
isMigrating,
sourceMangaId,
error,
status,
}: {
sourceMangaId: MangaIdInfo['id'];
isMigrating: boolean;
} & Pick<TMigrationEntry, 'error' | 'status'> &
Pick<MigrationMatch, 'id' | 'title'>) => {
@@ -138,9 +136,7 @@ const EntryError = ({
color="error"
startIcon={<ReplayIcon />}
onClick={() =>
MigrationManager.retryEntry(sourceMangaId).catch(
defaultPromiseErrorHandler('MigrationEntryRow::retry'),
)
MigrationManager.retryEntry(id).catch(defaultPromiseErrorHandler('MigrationEntryRow::retry'))
}
>
{t`Retry`}
@@ -239,6 +235,17 @@ export const MigrationDestinationEntry = ({
>
<MigrationEntryCardContent>
{(() => {
if (error) {
return (
<EntryError
id={sourceMangaId}
title={sourceMangaTitle}
error={error}
isMigrating={isMigrating}
status={status}
/>
);
}
if (!entry) {
return (
<EntryStatus
@@ -250,19 +257,6 @@ export const MigrationDestinationEntry = ({
);
}
if (error) {
return (
<EntryError
id={entry.id}
title={entry.title}
error={error}
sourceMangaId={sourceMangaId}
isMigrating={isMigrating}
status={status}
/>
);
}
return <EntryData {...entry} />;
})()}
</MigrationEntryCardContent>