1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-02-03 01:22:44 +01:00

fix(web): cancel people merge selection: do not show "Change name successfully" notification ()

fix(web): cancel people merge selection: do not show "Change name successfully" notification.

Co-authored-by: André Ventura <afv@users.noreply.github.com>
This commit is contained in:
André Ventura 2025-01-28 17:43:52 +00:00 committed by GitHub
parent c2ba1cc202
commit 060300de8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,6 +92,7 @@
let personMerge1: PersonResponseDto | undefined = $state();
let personMerge2: PersonResponseDto | undefined = $state();
let potentialMergePeople: PersonResponseDto[] = $state([]);
let isSuggestionSelectedByUser = $state(false);
let personName = '';
let suggestedPeople: PersonResponseDto[] = $state([]);
@ -233,15 +234,22 @@
personName = person.name;
personMerge1 = person;
personMerge2 = person2;
isSuggestionSelectedByUser = true;
viewMode = PersonPageViewMode.SUGGEST_MERGE;
};
const changeName = async () => {
viewMode = PersonPageViewMode.VIEW_ASSETS;
person.name = personName;
try {
isEditingName = false;
isEditingName = false;
if (isSuggestionSelectedByUser) {
// User canceled the merge
isSuggestionSelectedByUser = false;
return;
}
try {
person = await updatePerson({ id: person.id, personUpdateDto: { name: personName } });
notificationController.show({