From 012d101dbe69aaef5e2af40becec95a3a3c97164 Mon Sep 17 00:00:00 2001 From: anirbanpaulcom Date: Tue, 16 Apr 2024 18:00:22 +0530 Subject: [PATCH] emptyInput --- app/containers/MessageComposer/components/ComposerInput.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/containers/MessageComposer/components/ComposerInput.tsx b/app/containers/MessageComposer/components/ComposerInput.tsx index 0155b08b4..0edd2bccf 100644 --- a/app/containers/MessageComposer/components/ComposerInput.tsx +++ b/app/containers/MessageComposer/components/ComposerInput.tsx @@ -143,7 +143,8 @@ export const ComposerInput = memo( })); const setInput: TSetInput = (text, selection) => { - textRef.current = text; + const message = text.trim(); + textRef.current = message; if (inputRef.current) { inputRef.current.setNativeProps({ text }); } @@ -154,7 +155,7 @@ export const ComposerInput = memo( selectionRef.current = selection; }, 50); } - setMicOrSend(text.length === 0 ? 'mic' : 'send'); + setMicOrSend(message.length === 0 ? 'mic' : 'send'); }; const focus = () => {