1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

fix(web): toggle favorite (#19453)

This commit is contained in:
Daimolean
2025-06-23 21:36:30 +08:00
committed by GitHub
parent 813186e618
commit 7f89999abe

View File

@ -203,8 +203,12 @@
personUpdateDto: { isFavorite: !detail.isFavorite },
});
const index = people.findIndex((person) => person.id === detail.id);
people[index] = updatedPerson;
people = people.map((person: PersonResponseDto) => {
if (person.id === updatedPerson.id) {
return updatedPerson;
}
return person;
});
notificationController.show({
message: updatedPerson.isFavorite ? $t('added_to_favorites') : $t('removed_from_favorites'),