2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Inline bot cancel button added.

It replaces Send button when the user is editing an inline bot
query. First cancel clears the inline bot request, second one
clears the field entirely. Escape key acts the same as cancel.
This commit is contained in:
John Preston
2016-04-09 15:02:50 +04:00
parent c3c82eac2d
commit 0110a62776
9 changed files with 246 additions and 153 deletions

View File

@@ -723,6 +723,15 @@ void MainWidget::onFilesOrForwardDrop(const PeerId &peer, const QMimeData *data)
}
}
void MainWidget::rpcClear() {
history.rpcClear();
dialogs.rpcClear();
if (profile) profile->rpcClear();
if (overview) overview->rpcClear();
if (_api) _api->rpcClear();
RPCSender::rpcClear();
}
QPixmap MainWidget::grabInner() {
if (overview && !overview->isHidden()) {
return myGrab(overview);
@@ -2306,7 +2315,7 @@ void MainWidget::updateAfterDrag() {
}
void MainWidget::ctrlEnterSubmitUpdated() {
history.ctrlEnterSubmitUpdated();
history.updateFieldSubmitSettings();
}
void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool back) {