2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Ability to copy button callback data

This commit is contained in:
RadRussianRus
2019-09-29 20:51:53 +03:00
parent bb143a26f2
commit a25aaaf531
2 changed files with 7 additions and 0 deletions

View File

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

View File

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