Composer: Clear draft after sending message in non-main threads (#4692)

This commit is contained in:
Alexander Zinchuk 2024-06-18 16:30:36 +02:00
parent 4cef8b62c1
commit 72e5dc177d

View File

@ -1010,8 +1010,9 @@ const Composer: FC<OwnProps & StateProps> = ({
} }
lastMessageSendTimeSeconds.current = getServerTime(); lastMessageSendTimeSeconds.current = getServerTime();
clearDraft({
clearDraft({ chatId, isLocalOnly: true, shouldKeepReply: isForwarding }); chatId, threadId, isLocalOnly: true, shouldKeepReply: isForwarding,
});
if (IS_IOS && messageInput && messageInput === document.activeElement) { if (IS_IOS && messageInput && messageInput === document.activeElement) {
applyIosAutoCapitalizationFix(messageInput); applyIosAutoCapitalizationFix(messageInput);
@ -1164,7 +1165,8 @@ const Composer: FC<OwnProps & StateProps> = ({
isSilent, isSilent,
shouldUpdateStickerSetOrder: shouldUpdateStickerSetOrder && canUpdateStickerSetsOrder, shouldUpdateStickerSetOrder: shouldUpdateStickerSetOrder && canUpdateStickerSetsOrder,
}); });
clearDraft({ chatId, isLocalOnly: true }); clearDraft({ chatId, threadId, isLocalOnly: true });
requestMeasure(() => { requestMeasure(() => {
resetComposer(shouldPreserveInput); resetComposer(shouldPreserveInput);
}); });