From eb1428b1d80eb78fba3804910e8fb264d1eef124 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 16 May 2024 19:08:04 -0500 Subject: [PATCH] Fix delete message error (#4065) --- src/components/dms/MessageMenu.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/dms/MessageMenu.tsx b/src/components/dms/MessageMenu.tsx index 553e1be5..1a2ad01d 100644 --- a/src/components/dms/MessageMenu.tsx +++ b/src/components/dms/MessageMenu.tsx @@ -34,7 +34,6 @@ export let MessageMenu = ({ const {currentAccount} = useSession() const convo = useConvoActive() const deleteControl = usePromptControl() - const retryDeleteControl = usePromptControl() const reportControl = usePromptControl() const isFromSelf = message.sender?.did === currentAccount?.did @@ -57,8 +56,8 @@ export let MessageMenu = ({ convo .deleteMessage(message.id) .then(() => Toast.show(_(msg`Message deleted`))) - .catch(() => retryDeleteControl.open()) - }, [_, convo, message.id, retryDeleteControl]) + .catch(() => Toast.show(_(msg`Failed to delete message`))) + }, [_, convo, message.id]) return ( <> @@ -125,17 +124,6 @@ export let MessageMenu = ({ confirmButtonColor="negative" onConfirm={onDelete} /> - - ) }