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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user