mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Version 4.6.2: Fix ghost drafts appearing in channels.
This commit is contained in:
parent
84b4ab1c3c
commit
ee1162faff
2 changed files with 8 additions and 5 deletions
|
@ -1867,11 +1867,11 @@ void HistoryWidget::fastShowAtEnd(not_null<History*> history) {
|
|||
}
|
||||
}
|
||||
|
||||
void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) {
|
||||
bool HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) {
|
||||
InvokeQueued(this, [=] { updateStickersByEmoji(); });
|
||||
|
||||
if (_voiceRecordBar->isActive() || !_canSendTexts) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto editDraft = _history ? _history->localEditDraft({}) : nullptr;
|
||||
|
@ -1893,7 +1893,7 @@ void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) {
|
|||
updateControlsGeometry();
|
||||
}
|
||||
refreshTopBarActiveChat();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
_textUpdateEvents = 0;
|
||||
|
@ -1930,6 +1930,7 @@ void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) {
|
|||
_processingReplyId = draft ? draft->msgId : MsgId();
|
||||
processReply();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void HistoryWidget::applyCloudDraft(History *history) {
|
||||
|
@ -2261,7 +2262,9 @@ void HistoryWidget::showHistory(
|
|||
handlePeerUpdate();
|
||||
|
||||
session().local().readDraftsWithCursors(_history);
|
||||
applyDraft();
|
||||
if (!applyDraft()) {
|
||||
clearFieldText();
|
||||
}
|
||||
_send->finishAnimating();
|
||||
|
||||
updateControlsGeometry();
|
||||
|
|
|
@ -213,7 +213,7 @@ public:
|
|||
void botCallbackSent(not_null<HistoryItem*> item);
|
||||
|
||||
void fastShowAtEnd(not_null<History*> history);
|
||||
void applyDraft(
|
||||
bool applyDraft(
|
||||
FieldHistoryAction fieldHistoryAction = FieldHistoryAction::Clear);
|
||||
void showHistory(const PeerId &peer, MsgId showAtMsgId, bool reload = false);
|
||||
void setChooseReportMessagesDetails(
|
||||
|
|
Loading…
Add table
Reference in a new issue