mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: custom impl for set.difference api (#19135)
This commit is contained in:
parent
0322a8b1d9
commit
144cc8ab6d
4 changed files with 16 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { TimelinePlainDate } from '$lib/utils/timeline-util';
|
||||
import { setDifference, type TimelinePlainDate } from '$lib/utils/timeline-util';
|
||||
import { AssetOrder } from '@immich/sdk';
|
||||
import type { DayGroup } from './day-group.svelte';
|
||||
import type { MonthGroup } from './month-group.svelte';
|
||||
|
|
@ -27,7 +27,7 @@ export class GroupInsertionCache {
|
|||
}
|
||||
|
||||
get existingDayGroups() {
|
||||
return this.changedDayGroups.difference(this.newDayGroups);
|
||||
return setDifference(this.changedDayGroups, this.newDayGroups);
|
||||
}
|
||||
|
||||
get updatedBuckets() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { TimelinePlainDate } from '$lib/utils/timeline-util';
|
||||
import { setDifference, type TimelinePlainDate } from '$lib/utils/timeline-util';
|
||||
import { AssetOrder } from '@immich/sdk';
|
||||
|
||||
import { GroupInsertionCache } from '../group-insertion-cache.svelte';
|
||||
|
|
@ -76,7 +76,7 @@ export function runAssetOperation(
|
|||
if (moveAssets.length > 0) {
|
||||
combinedMoveAssets.push(moveAssets);
|
||||
}
|
||||
idsToProcess = idsToProcess.difference(processedIds);
|
||||
idsToProcess = setDifference(idsToProcess, processedIds);
|
||||
for (const id of processedIds) {
|
||||
idsProcessed.add(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
fromTimelinePlainDateTime,
|
||||
fromTimelinePlainYearMonth,
|
||||
getTimes,
|
||||
setDifference,
|
||||
type TimelinePlainDateTime,
|
||||
type TimelinePlainYearMonth,
|
||||
} from '$lib/utils/timeline-util';
|
||||
|
|
@ -132,7 +133,7 @@ export class MonthGroup {
|
|||
if (moveAssets.length > 0) {
|
||||
combinedMoveAssets.push(moveAssets);
|
||||
}
|
||||
idsToProcess = idsToProcess.difference(processedIds);
|
||||
idsToProcess = setDifference(idsToProcess, processedIds);
|
||||
for (const id of processedIds) {
|
||||
idsProcessed.add(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue