emptyInput

This commit is contained in:
anirbanpaulcom 2024-04-16 18:00:22 +05:30
parent 7a4699d6cd
commit 012d101dbe
1 changed files with 3 additions and 2 deletions

View File

@ -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 = () => {