diff --git a/src/script/page/RightSidebar/ConversationDetails/utils/getConversationActions.ts b/src/script/page/RightSidebar/ConversationDetails/utils/getConversationActions.ts index 8814e0b0598..9b214589fd6 100644 --- a/src/script/page/RightSidebar/ConversationDetails/utils/getConversationActions.ts +++ b/src/script/page/RightSidebar/ConversationDetails/utils/getConversationActions.ts @@ -153,7 +153,7 @@ const getConversationActions = ({ { condition: !isSingleUser && isTeam && roleRepository.canDeleteGroup(conversationEntity), item: { - click: async () => actionsViewModel.deleteConversation(conversationEntity), + click: () => actionsViewModel.deleteConversation(conversationEntity), Icon: Icon.DeleteIcon, identifier: 'do-delete', label: t('conversationDetailsActionDelete'), diff --git a/src/script/view_model/ActionsViewModel.ts b/src/script/view_model/ActionsViewModel.ts index e6cb755e90f..b60cf68e6db 100644 --- a/src/script/view_model/ActionsViewModel.ts +++ b/src/script/view_model/ActionsViewModel.ts @@ -302,18 +302,16 @@ export class ActionsViewModel { }); }; - readonly deleteConversation = (conversationEntity: Conversation): Promise => { - return new Promise(() => { - PrimaryModal.show(PrimaryModal.type.CONFIRM, { - primaryAction: { - action: () => this.conversationRepository.deleteConversation(conversationEntity), - text: t('modalConversationDeleteGroupAction'), - }, - text: { - message: t('modalConversationDeleteGroupMessage'), - title: t('modalConversationDeleteGroupHeadline', conversationEntity.display_name()), - }, - }); + readonly deleteConversation = (conversationEntity: Conversation) => { + PrimaryModal.show(PrimaryModal.type.CONFIRM, { + primaryAction: { + action: () => this.conversationRepository.deleteConversation(conversationEntity), + text: t('modalConversationDeleteGroupAction'), + }, + text: { + message: t('modalConversationDeleteGroupMessage'), + title: t('modalConversationDeleteGroupHeadline', conversationEntity.display_name()), + }, }); };