From e4fc7cd6f969559af9e4add30b42472913bb521f Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Mon, 31 Jul 2023 17:55:15 +0200 Subject: [PATCH] Close note context menu as soon as the confirmation dialog appears --- src/components/Note/NoteHeader/NoteHeader.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Note/NoteHeader/NoteHeader.tsx b/src/components/Note/NoteHeader/NoteHeader.tsx index 095a055..55d339f 100644 --- a/src/components/Note/NoteHeader/NoteHeader.tsx +++ b/src/components/Note/NoteHeader/NoteHeader.tsx @@ -168,13 +168,19 @@ const NoteHeader: Component<{ note: PrimalNote, openCustomZap?: () => void}> = ( const noteContextForOtherPeople: MenuItem[] = [ { label: intl.formatMessage(tActions.noteContext.muteAuthor), - action: () => setConfirmMuteUser(true), + action: () => { + setConfirmMuteUser(true); + setContext(false); + }, icon: 'mute_user', warning: true, }, { label: intl.formatMessage(tActions.noteContext.reportAuthor), - action: () => setConfirmReportUser(true), + action: () => { + setConfirmReportUser(true); + setContext(false); + }, icon: 'report', warning: true, },