Clear the composer preview after sending a message. (#34116)
* Clear the composer preview after sending a message. * fixup
This commit is contained in:
@@ -395,6 +395,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
|
||||
};
|
||||
|
||||
private sendMessage = async (): Promise<void> => {
|
||||
this.setState({ urlPreviewComposerContent: "" });
|
||||
if (this.state.haveRecording && this.voiceRecordingButton.current) {
|
||||
// There shouldn't be any text message to send when a voice recording is active, so
|
||||
// just send out the voice recording.
|
||||
|
||||
@@ -34,7 +34,8 @@ export function MessageComposerUrlPreviewWrapper({ content }: { content: string
|
||||
void vm.updateWithText(content);
|
||||
},
|
||||
[vm, content],
|
||||
DEBOUNCE_REQUEST_TIMEOUT_MS,
|
||||
// Update instantly if content is empty (e.g. sent message or cleared input)
|
||||
content ? DEBOUNCE_REQUEST_TIMEOUT_MS : 0,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user