Open links from bot buttons with regular UrlClickHandler.

Fix render glitch in dialogs widget after search.
This commit is contained in:
John Preston 2016-08-03 19:18:23 +01:00
parent 80adba61d4
commit e87c1b6024
3 changed files with 3 additions and 2 deletions

View File

@ -2214,6 +2214,7 @@ void DialogsWidget::searchReceived(DialogsSearchRequestType type, const MTPmessa
_searchRequest = 0;
onListScroll();
update();
}
}

View File

@ -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: {

View File

@ -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);
}
}
}