From e87c1b6024065dee56b184a3444e6c16d8907d17 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 3 Aug 2016 19:18:23 +0100 Subject: [PATCH] Open links from bot buttons with regular UrlClickHandler. Fix render glitch in dialogs widget after search. --- Telegram/SourceFiles/dialogswidget.cpp | 1 + Telegram/SourceFiles/facades.cpp | 2 +- Telegram/SourceFiles/historywidget.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 66196dff7..eed96774f 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -2214,6 +2214,7 @@ void DialogsWidget::searchReceived(DialogsSearchRequestType type, const MTPmessa _searchRequest = 0; onListScroll(); + update(); } } diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 3f82c3d85..936ea552d 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -78,7 +78,7 @@ void activateBotCommand(const HistoryItem *msg, int row, int col) { case HistoryMessageReplyMarkup::Button::Url: { auto url = QString::fromUtf8(button->data); - HiddenUrlClickHandler(url).onClick(Qt::LeftButton); + UrlClickHandler(url).onClick(Qt::LeftButton); } break; case HistoryMessageReplyMarkup::Button::RequestLocation: { diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index b587be32c..45b1a2792 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -5794,7 +5794,7 @@ void HistoryWidget::botCallbackDone(BotCallbackInfo info, const MTPmessages_BotC Ui::Toast::Show(App::wnd(), toast); } } else if (answerData.has_url()) { - HiddenUrlClickHandler(qs(answerData.vurl)).onClick(Qt::LeftButton); + UrlClickHandler(qs(answerData.vurl)).onClick(Qt::LeftButton); } } }