Prevent overwriting a manual selected migration match
This commit is contained in:
@@ -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 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 destination source selection by same order as browse source page
|
||||||
- (**Migration**) Sort entries in search/execution page by title
|
- (**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
|
### 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 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 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 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 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
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export interface TMigrationEntry {
|
|||||||
error: string | undefined;
|
error: string | undefined;
|
||||||
isExcluded: boolean;
|
isExcluded: boolean;
|
||||||
areMatchesExpanded: boolean;
|
areMatchesExpanded: boolean;
|
||||||
|
isManualSelection: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MigratableEntry = NonNullableProperty<TMigrationEntry, 'selectedMatchMangaId' | 'selectedMatchSourceId'>;
|
export type MigratableEntry = NonNullableProperty<TMigrationEntry, 'selectedMatchMangaId' | 'selectedMatchSourceId'>;
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ export class MigrationManager {
|
|||||||
error: entry.error,
|
error: entry.error,
|
||||||
isExcluded: entry.isExcluded,
|
isExcluded: entry.isExcluded,
|
||||||
areMatchesExpanded: entry.areMatchesExpanded,
|
areMatchesExpanded: entry.areMatchesExpanded,
|
||||||
|
isManualSelection: entry.isManualSelection,
|
||||||
} satisfies TMigrationEntry;
|
} satisfies TMigrationEntry;
|
||||||
|
|
||||||
if (isEqual(entry, updatedEntry)) {
|
if (isEqual(entry, updatedEntry)) {
|
||||||
@@ -346,6 +347,7 @@ export class MigrationManager {
|
|||||||
isExcluded: false,
|
isExcluded: false,
|
||||||
areMatchesExpanded: false,
|
areMatchesExpanded: false,
|
||||||
error: undefined,
|
error: undefined,
|
||||||
|
isManualSelection: false,
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
@@ -592,6 +594,7 @@ export class MigrationManager {
|
|||||||
entry.status = MigrationEntryStatus.SEARCH_COMPLETE;
|
entry.status = MigrationEntryStatus.SEARCH_COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entry.isManualSelection = true;
|
||||||
entry.selectedMatchMangaId = targetMangaId;
|
entry.selectedMatchMangaId = targetMangaId;
|
||||||
entry.selectedMatchSourceId = targetSourceId;
|
entry.selectedMatchSourceId = targetSourceId;
|
||||||
}
|
}
|
||||||
@@ -915,6 +918,7 @@ export class MigrationManager {
|
|||||||
!draftMatchEntry);
|
!draftMatchEntry);
|
||||||
|
|
||||||
const isPreferredMatch =
|
const isPreferredMatch =
|
||||||
|
!draftEntry.isManualSelection &&
|
||||||
!ignoreOutdatedMatch &&
|
!ignoreOutdatedMatch &&
|
||||||
(isPreferredSourcePriorityMatch || isPreferredChapterNumberMatch);
|
(isPreferredSourcePriorityMatch || isPreferredChapterNumberMatch);
|
||||||
if (isPreferredMatch) {
|
if (isPreferredMatch) {
|
||||||
|
|||||||
Reference in New Issue
Block a user