Ability to copy button callback data
This commit is contained in:
parent
bb143a26f2
commit
a25aaaf531
2 changed files with 7 additions and 0 deletions
|
|
@ -2226,5 +2226,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"ktg_about_text1_tdesktop" = "Telegram Desktop";
|
||||
"ktg_about_text3" = "Visit {channel_link} or {faq_link} for more info.";
|
||||
"ktg_about_text3_channel" = "Kotatogram channel";
|
||||
"ktg_copy_btn_callback" = "Copy callback data";
|
||||
|
||||
// Keys finished
|
||||
|
|
|
|||
|
|
@ -376,6 +376,9 @@ QString ReplyMarkupClickHandler::copyToClipboardText() const {
|
|||
if (button->type == Type::Url || button->type == Type::Auth) {
|
||||
return QString::fromUtf8(button->data);
|
||||
}
|
||||
if (button->type == Type::Callback || button->type == Type::Game) {
|
||||
return QString::fromUtf8(button->data);
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
|
@ -386,6 +389,9 @@ QString ReplyMarkupClickHandler::copyToClipboardContextItemText() const {
|
|||
if (button->type == Type::Url || button->type == Type::Auth) {
|
||||
return tr::lng_context_copy_link(tr::now);
|
||||
}
|
||||
if (button->type == Type::Callback || button->type == Type::Game) {
|
||||
return tr::ktg_copy_btn_callback(tr::now);
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue