mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix(web): person that is in the same asset multiple times (#28971)
This commit is contained in:
parent
8132e8a38c
commit
92a75b0cd3
1 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import type { AssetFaceResponseDto, PersonResponseDto } from '@immich/sdk';
|
||||
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
||||
import { SvelteMap } from 'svelte/reactivity';
|
||||
import { assetCacheManager } from '$lib/managers/AssetCacheManager.svelte';
|
||||
import type { Faces } from '$lib/managers/asset-viewer-manager.svelte';
|
||||
import { CancellableTask } from '$lib/utils/cancellable-task';
|
||||
|
|
@ -24,15 +24,15 @@ class FaceManager {
|
|||
});
|
||||
|
||||
readonly people = $derived.by(() => {
|
||||
const people = new SvelteSet<PersonResponseDto>();
|
||||
const people = new SvelteMap<string, PersonResponseDto>();
|
||||
|
||||
for (const face of this.data) {
|
||||
if (face.person) {
|
||||
people.add(face.person);
|
||||
people.set(face.person.id, face.person);
|
||||
}
|
||||
}
|
||||
|
||||
return people;
|
||||
return people.values();
|
||||
});
|
||||
|
||||
readonly facesByPersonId = $derived.by(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue