Prevent overwriting a manual selected migration match

This commit is contained in:
schroda
2026-05-16 22:36:22 +02:00
parent 4095e65f48
commit 531ec46be7
3 changed files with 7 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Migration**) Sort manga to migrate selection by title and by recently added to the library
- (**Migration**) Sort destination source selection by same order as browse source page
- (**Migration**) Sort entries in search/execution page by title
- (**Migration**) Prevent a manual selected match from getting automatically overwritten by a new-found match
### Fixed
@@ -23,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Migration**) Fix showing an empty "Available" source group header when all sources are selected
- (**Migration**) Fix showing no info message when no sources are available to select as destinations
- (**Migration**) Fix duplicated search matches after resuming the migration search
- (**Migration**) Fix search progress not getting updated after a manual search
- (**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

@@ -121,6 +121,7 @@ export interface TMigrationEntry {
error: string | undefined;
isExcluded: boolean;
areMatchesExpanded: boolean;
isManualSelection: boolean;
}
export type MigratableEntry = NonNullableProperty<TMigrationEntry, 'selectedMatchMangaId' | 'selectedMatchSourceId'>;

View File

@@ -273,6 +273,7 @@ export class MigrationManager {
error: entry.error,
isExcluded: entry.isExcluded,
areMatchesExpanded: entry.areMatchesExpanded,
isManualSelection: entry.isManualSelection,
} satisfies TMigrationEntry;
if (isEqual(entry, updatedEntry)) {
@@ -346,6 +347,7 @@ export class MigrationManager {
isExcluded: false,
areMatchesExpanded: false,
error: undefined,
isManualSelection: false,
},
]),
);
@@ -592,6 +594,7 @@ export class MigrationManager {
entry.status = MigrationEntryStatus.SEARCH_COMPLETE;
}
entry.isManualSelection = true;
entry.selectedMatchMangaId = targetMangaId;
entry.selectedMatchSourceId = targetSourceId;
}
@@ -915,6 +918,7 @@ export class MigrationManager {
!draftMatchEntry);
const isPreferredMatch =
!draftEntry.isManualSelection &&
!ignoreOutdatedMatch &&
(isPreferredSourcePriorityMatch || isPreferredChapterNumberMatch);
if (isPreferredMatch) {