diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 7b9833592..5e3ee637d 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -5607,6 +5607,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_bot_earn_credits_out_minimal" = "You cannot withdraw less than {link}."; "lng_bot_earn_credits_out_minimal_link#one" = "{count} star"; "lng_bot_earn_credits_out_minimal_link#other" = "{count} stars"; +"lng_bot_copy_text_tooltip" = "Copy to Clipboard: {text}"; "lng_contact_add" = "Add"; "lng_contact_send_message" = "Message"; diff --git a/Telegram/SourceFiles/history/history_item_components.cpp b/Telegram/SourceFiles/history/history_item_components.cpp index 55e9e09a5..7ea8597bb 100644 --- a/Telegram/SourceFiles/history/history_item_components.cpp +++ b/Telegram/SourceFiles/history/history_item_components.cpp @@ -651,6 +651,14 @@ QString ReplyMarkupClickHandler::buttonText() const { } QString ReplyMarkupClickHandler::tooltip() const { + if (const auto button = getButton()) { + if (button->type == HistoryMessageMarkupButton::Type::CopyText) { + return tr::lng_bot_copy_text_tooltip( + tr::now, + lt_text, + st::wrap_rtl(QString::fromUtf8(button->data))); + } + } const auto button = getUrlButton(); const auto url = button ? QString::fromUtf8(button->data) : QString(); const auto text = _fullDisplayed ? QString() : buttonText();