From eb1428b1d80eb78fba3804910e8fb264d1eef124 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Thu, 16 May 2024 19:08:04 -0500
Subject: Fix delete message error (#4065)

---
 src/components/dms/MessageMenu.tsx | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

(limited to 'src/components/dms/MessageMenu.tsx')

diff --git a/src/components/dms/MessageMenu.tsx b/src/components/dms/MessageMenu.tsx
index 553e1be53..1a2ad01dc 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}
       />
-
-      <Prompt.Basic
-        control={retryDeleteControl}
-        title={_(msg`Failed to delete message`)}
-        description={_(
-          msg`An error occurred while trying to delete the message. Please try again.`,
-        )}
-        confirmButtonCta={_(msg`Retry`)}
-        confirmButtonColor="negative"
-        onConfirm={onDelete}
-      />
     </>
   )
 }
-- 
cgit 1.4.1

