mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Attempted to fix reset state while replying with Ctrl+Up/Down hotkey.
Regression was introduced: a05d85673a.
This commit is contained in:
@@ -7755,7 +7755,7 @@ bool HistoryWidget::replyToPreviousMessage() {
|
||||
controller()->showMessage(previous);
|
||||
if (isFieldVisible) {
|
||||
if (previous->isLocal()) {
|
||||
cancelReply();
|
||||
cancelReply(false, true);
|
||||
} else {
|
||||
replyToMessage(previous);
|
||||
}
|
||||
@@ -7798,13 +7798,12 @@ bool HistoryWidget::replyToNextMessage() {
|
||||
controller()->showMessage(next);
|
||||
if (isFieldVisible) {
|
||||
if (next->isLocal()) {
|
||||
cancelReply();
|
||||
cancelReply(false, true);
|
||||
} else {
|
||||
replyToMessage(next);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_highlighter.clear();
|
||||
cancelReply(false);
|
||||
}
|
||||
return true;
|
||||
@@ -8971,7 +8970,9 @@ bool HistoryWidget::cancelReplyOrSuggest(bool lastKeyboardUsed) {
|
||||
return ok1 || ok2;
|
||||
}
|
||||
|
||||
bool HistoryWidget::cancelReply(bool lastKeyboardUsed) {
|
||||
bool HistoryWidget::cancelReply(
|
||||
bool lastKeyboardUsed,
|
||||
bool keepHighlighterState) {
|
||||
bool wasReply = false;
|
||||
if (_replyTo) {
|
||||
wasReply = true;
|
||||
@@ -8986,6 +8987,9 @@ bool HistoryWidget::cancelReply(bool lastKeyboardUsed) {
|
||||
_fieldBarCancel->hide();
|
||||
updateMouseTracking();
|
||||
}
|
||||
if (!keepHighlighterState) {
|
||||
_highlighter.clear();
|
||||
}
|
||||
updateBotKeyboard();
|
||||
refreshTopBarActiveChat();
|
||||
updateCanSendMessage();
|
||||
|
||||
@@ -222,7 +222,9 @@ public:
|
||||
bool lastForceReplyReplied(const FullMsgId &replyTo) const;
|
||||
bool lastForceReplyReplied() const;
|
||||
bool cancelReplyOrSuggest(bool lastKeyboardUsed = false);
|
||||
bool cancelReply(bool lastKeyboardUsed = false);
|
||||
bool cancelReply(
|
||||
bool lastKeyboardUsed = false,
|
||||
bool keepHighlighterState = false);
|
||||
bool cancelSuggestPost();
|
||||
void cancelEdit();
|
||||
void updateForwarding();
|
||||
|
||||
Reference in New Issue
Block a user