fix(web): timeline time bucket issue (#20438)

This commit is contained in:
Jason Rasmussen
2025-07-30 12:21:02 -04:00
committed by GitHub
parent 097e132fba
commit d5a01c0310
9 changed files with 36 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
import { setDifference, type TimelinePlainDate } from '$lib/utils/timeline-util';
import { setDifference, type TimelineDate } from '$lib/utils/timeline-util';
import { AssetOrder } from '@immich/sdk';
import { SvelteSet } from 'svelte/reactivity';
import type { DayGroup } from './day-group.svelte';
@@ -13,11 +13,11 @@ export class GroupInsertionCache {
changedDayGroups = new SvelteSet<DayGroup>();
newDayGroups = new SvelteSet<DayGroup>();
getDayGroup({ year, month, day }: TimelinePlainDate): DayGroup | undefined {
getDayGroup({ year, month, day }: TimelineDate): DayGroup | undefined {
return this.#lookupCache[year]?.[month]?.[day];
}
setDayGroup(dayGroup: DayGroup, { year, month, day }: TimelinePlainDate) {
setDayGroup(dayGroup: DayGroup, { year, month, day }: TimelineDate) {
if (!this.#lookupCache[year]) {
this.#lookupCache[year] = {};
}