diff --git a/app/components/DialogInput/DialogInput.tsx b/app/components/DialogInput/DialogInput.tsx index e529a4e..4cb6354 100644 --- a/app/components/DialogInput/DialogInput.tsx +++ b/app/components/DialogInput/DialogInput.tsx @@ -60,6 +60,7 @@ export function DialogInput() { useHotkeys([ ['Esc', () => { setAttachments([]); + deselectAllMessages(); }] ], [], true); diff --git a/app/components/MessageAttachments/MessageAttachments.tsx b/app/components/MessageAttachments/MessageAttachments.tsx index 6446d1e..44c7714 100644 --- a/app/components/MessageAttachments/MessageAttachments.tsx +++ b/app/components/MessageAttachments/MessageAttachments.tsx @@ -42,7 +42,6 @@ export function MessageAttachments(props: MessageAttachmentsProps) { text: props.text, parent: props.parent, } - console.info("Rendering attachment", attachProps); switch (att.type) { case AttachmentType.MESSAGES: return diff --git a/app/components/ReplyHeader/ReplyHeader.tsx b/app/components/ReplyHeader/ReplyHeader.tsx index 23b6c4c..760895c 100644 --- a/app/components/ReplyHeader/ReplyHeader.tsx +++ b/app/components/ReplyHeader/ReplyHeader.tsx @@ -1,7 +1,7 @@ import { useRosettaColors } from "@/app/hooks/useRosettaColors"; import { useReplyMessages } from "@/app/providers/DialogProvider/useReplyMessages"; import { Button, Flex, Modal, Text } from "@mantine/core"; -import { useDisclosure, useHotkeys } from "@mantine/hooks"; +import { useDisclosure } from "@mantine/hooks"; import { IconCornerUpLeft, IconCornerUpRightDouble, IconTrash, IconX } from "@tabler/icons-react"; import classes from "./ReplyHeader.module.css"; import { DialogsList } from "../DialogsList/DialogsList"; @@ -19,10 +19,6 @@ export function ReplyHeader() { const [opened, { open, close }] = useDisclosure(false); const navigate = useNavigate(); const {deleteSelectedMessages} = useDialog(); - - useHotkeys([ - ['Esc', deselectAllMessages] - ], [], true); const onClickForward = () => { open(); diff --git a/app/providers/DialogProvider/useReplyMessages.ts b/app/providers/DialogProvider/useReplyMessages.ts index 4475286..487e8bb 100644 --- a/app/providers/DialogProvider/useReplyMessages.ts +++ b/app/providers/DialogProvider/useReplyMessages.ts @@ -35,6 +35,7 @@ export function useReplyMessages() { const {dialog} = context; const selectMessage = (message : MessageReply) => { + console.info("-> ", replyMessages); console.info(message); if(replyMessages.publicKey != dialog){ /** @@ -70,6 +71,7 @@ export function useReplyMessages() { } const deselectAllMessages = () => { + console.info("Deselecting all messages"); setReplyMessages({ publicKey: "", messages: []