Fix updating migration search progress on manual match selection
The "success" and "completed" count could become larger than the "total" count when manually selecting a match for a successful search with no automatically selected match (e.g. when all matches are outdated)
This commit is contained in:
@@ -10,6 +10,10 @@ import type { MigratableEntry, TMigrationEntry } from '@/features/migration/Migr
|
||||
import { MigrationEntryStatus } from '@/features/migration/Migration.types.ts';
|
||||
|
||||
export class MigrationEntries {
|
||||
public static isSearching(entry: TMigrationEntry): boolean {
|
||||
return [MigrationEntryStatus.PENDING, MigrationEntryStatus.SEARCHING].includes(entry.status);
|
||||
}
|
||||
|
||||
public static getExcluded(entries: TMigrationEntry[]): TMigrationEntry[] {
|
||||
return entries.filter((entry) => entry.isExcluded);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user