Fix retrying failed migration search
This commit is contained in:
@@ -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 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 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 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 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 wrongly positioned mobile progress bar current page indicator
|
||||||
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled
|
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled
|
||||||
|
|||||||
@@ -1153,6 +1153,9 @@ export class MigrationManager {
|
|||||||
|
|
||||||
if (MigrationEntries.hasStatus(entry, MigrationEntryStatus.SEARCH_FAILED)) {
|
if (MigrationEntries.hasStatus(entry, MigrationEntryStatus.SEARCH_FAILED)) {
|
||||||
MigrationManager.updateState((draft) => {
|
MigrationManager.updateState((draft) => {
|
||||||
|
const draftEntry = draft.entries[id];
|
||||||
|
draftEntry.status = MigrationEntryStatus.SEARCH_PENDING;
|
||||||
|
draftEntry.error = undefined;
|
||||||
draft.searchProgress.completed -= 1;
|
draft.searchProgress.completed -= 1;
|
||||||
draft.searchProgress.failed -= 1;
|
draft.searchProgress.failed -= 1;
|
||||||
});
|
});
|
||||||
@@ -1168,6 +1171,9 @@ export class MigrationManager {
|
|||||||
|
|
||||||
if (MigrationEntries.hasStatus(entry, MigrationEntryStatus.MIGRATION_FAILED)) {
|
if (MigrationEntries.hasStatus(entry, MigrationEntryStatus.MIGRATION_FAILED)) {
|
||||||
MigrationManager.updateState((draft) => {
|
MigrationManager.updateState((draft) => {
|
||||||
|
const draftEntry = draft.entries[id];
|
||||||
|
draftEntry.status = MigrationEntryStatus.MIGRATION_PENDING;
|
||||||
|
draftEntry.error = undefined;
|
||||||
draft.migrationProgress.completed -= 1;
|
draft.migrationProgress.completed -= 1;
|
||||||
draft.migrationProgress.failed -= 1;
|
draft.migrationProgress.failed -= 1;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -72,11 +72,9 @@ const EntryError = ({
|
|||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
isMigrating,
|
isMigrating,
|
||||||
sourceMangaId,
|
|
||||||
error,
|
error,
|
||||||
status,
|
status,
|
||||||
}: {
|
}: {
|
||||||
sourceMangaId: MangaIdInfo['id'];
|
|
||||||
isMigrating: boolean;
|
isMigrating: boolean;
|
||||||
} & Pick<TMigrationEntry, 'error' | 'status'> &
|
} & Pick<TMigrationEntry, 'error' | 'status'> &
|
||||||
Pick<MigrationMatch, 'id' | 'title'>) => {
|
Pick<MigrationMatch, 'id' | 'title'>) => {
|
||||||
@@ -138,9 +136,7 @@ const EntryError = ({
|
|||||||
color="error"
|
color="error"
|
||||||
startIcon={<ReplayIcon />}
|
startIcon={<ReplayIcon />}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
MigrationManager.retryEntry(sourceMangaId).catch(
|
MigrationManager.retryEntry(id).catch(defaultPromiseErrorHandler('MigrationEntryRow::retry'))
|
||||||
defaultPromiseErrorHandler('MigrationEntryRow::retry'),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t`Retry`}
|
{t`Retry`}
|
||||||
@@ -239,6 +235,17 @@ export const MigrationDestinationEntry = ({
|
|||||||
>
|
>
|
||||||
<MigrationEntryCardContent>
|
<MigrationEntryCardContent>
|
||||||
{(() => {
|
{(() => {
|
||||||
|
if (error) {
|
||||||
|
return (
|
||||||
|
<EntryError
|
||||||
|
id={sourceMangaId}
|
||||||
|
title={sourceMangaTitle}
|
||||||
|
error={error}
|
||||||
|
isMigrating={isMigrating}
|
||||||
|
status={status}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
return (
|
return (
|
||||||
<EntryStatus
|
<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} />;
|
return <EntryData {...entry} />;
|
||||||
})()}
|
})()}
|
||||||
</MigrationEntryCardContent>
|
</MigrationEntryCardContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user