2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Bot keyboard button with type url / callback / phone / location

now can be displayed with an icon in the upper-right corner.

Inline bot keyboards almost done.
This commit is contained in:
John Preston
2016-03-30 20:42:01 +04:00
parent 3210aecbd2
commit b981472877
16 changed files with 296 additions and 124 deletions

View File

@@ -166,6 +166,16 @@ void ConfirmBox::resizeEvent(QResizeEvent *e) {
_cancel.moveToRight(st::boxButtonPadding.right() + _confirm.width() + st::boxButtonPadding.left(), _confirm.y());
}
SharePhoneConfirmBox::SharePhoneConfirmBox(PeerData *recipient)
: ConfirmBox(lang(lng_bot_share_phone), lang(lng_bot_share_phone_confirm))
, _recipient(recipient) {
connect(this, SIGNAL(confirmed()), this, SLOT(onConfirm()));
}
void SharePhoneConfirmBox::onConfirm() {
emit confirmed(_recipient);
}
ConfirmLinkBox::ConfirmLinkBox(const QString &url) : ConfirmBox(lang(lng_open_this_link) + qsl("\n\n") + url, lang(lng_open_link))
, _url(url) {
connect(this, SIGNAL(confirmed()), this, SLOT(onOpenLink()));