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