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 (#15744)
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:
parent
c2ba1cc202
commit
060300de8a
1 changed files with 10 additions and 2 deletions
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue