mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-25 01:50:36 +00:00
Don't drop reply info on empty message submit.
This commit is contained in:
parent
ade97fd2d2
commit
46d3f232af
@ -842,7 +842,9 @@ HistoryWidget::HistoryWidget(
|
||||
});
|
||||
} else {
|
||||
fastShowAtEnd(action.history);
|
||||
if (cancelReply(lastKeyboardUsed) && !action.clearDraft) {
|
||||
if (!_justMarkingAsRead
|
||||
&& cancelReply(lastKeyboardUsed)
|
||||
&& !action.clearDraft) {
|
||||
saveCloudDraft();
|
||||
}
|
||||
}
|
||||
@ -3963,7 +3965,12 @@ void HistoryWidget::send(Api::SendOptions options) {
|
||||
ignoreSlowmodeCountdown)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Just a flag not to drop reply info if we're not sending anything.
|
||||
_justMarkingAsRead = !HasSendText(_field)
|
||||
&& message.webPage.url.isEmpty();
|
||||
session().api().sendMessage(std::move(message));
|
||||
_justMarkingAsRead = false;
|
||||
|
||||
clearFieldText();
|
||||
if (_preview) {
|
||||
|
@ -812,6 +812,7 @@ private:
|
||||
int _itemsRevealHeight = 0;
|
||||
|
||||
bool _sponsoredMessagesStateKnown = false;
|
||||
bool _justMarkingAsRead = false;
|
||||
|
||||
object_ptr<Ui::PlainShadow> _topShadow;
|
||||
bool _inGrab = false;
|
||||
|
Loading…
Reference in New Issue
Block a user