Composer: Clear draft after sending GIF (#6323)

This commit is contained in:
zubiden 2025-10-08 12:33:29 +02:00 committed by Alexander Zinchuk
parent 61361b1107
commit fb29c7e333
2 changed files with 6 additions and 4 deletions

View File

@ -1111,7 +1111,7 @@ const Composer: FC<OwnProps & StateProps> = ({
lastMessageSendTimeSeconds.current = getServerTime(); lastMessageSendTimeSeconds.current = getServerTime();
clearDraft({ chatId, isLocalOnly: true }); clearDraft({ chatId, threadId, isLocalOnly: true });
// Wait until message animation starts // Wait until message animation starts
requestMeasure(() => { requestMeasure(() => {
@ -1397,6 +1397,8 @@ const Composer: FC<OwnProps & StateProps> = ({
resetComposer(true); resetComposer(true);
}); });
} }
clearDraft({ chatId, threadId, isLocalOnly: true });
}); });
const handleStickerSelect = useLastCallback(( const handleStickerSelect = useLastCallback((
@ -1486,14 +1488,14 @@ const Composer: FC<OwnProps & StateProps> = ({
applyIosAutoCapitalizationFix(messageInput); applyIosAutoCapitalizationFix(messageInput);
} }
clearDraft({ chatId, isLocalOnly: true }); clearDraft({ chatId, threadId, isLocalOnly: true });
requestMeasure(() => { requestMeasure(() => {
resetComposer(); resetComposer();
}); });
}); });
const handleBotCommandSelect = useLastCallback(() => { const handleBotCommandSelect = useLastCallback(() => {
clearDraft({ chatId, isLocalOnly: true }); clearDraft({ chatId, threadId, isLocalOnly: true });
requestMeasure(() => { requestMeasure(() => {
resetComposer(); resetComposer();
}); });

2
tauri/Cargo.lock generated
View File

@ -5400,7 +5400,7 @@ dependencies = [
[[package]] [[package]]
name = "telegram_air" name = "telegram_air"
version = "2.8.9" version = "2.8.10"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"cocoa", "cocoa",