From 4017d8db7c3a6ea0d88ea9243782a1a77ad90fac Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 28 Jul 2023 02:44:20 +0300 Subject: [PATCH] Removed Save button from box for bot username editing. --- Telegram/Resources/langs/lang.strings | 2 +- Telegram/SourceFiles/boxes/username_box.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 3a6b93532..acfe54a1d 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -433,7 +433,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_channel_usernames_deactivate_description" = "Do you want to hide this link from the channel info page?"; "lng_channel_usernames_description" = "Drag and drop links to change the order in which they will be displayed on the channel info page."; -"lng_bot_username_title" = "Username"; +"lng_bot_username_title" = "Public Link"; "lng_bot_username_description1" = "This link cannot be edited. You can acquire additional usernames on {link}."; "lng_bot_username_description1_link" = "Fragment"; "lng_bot_usernames_activate_description" = "Do you want to show this link on the bot info page?"; diff --git a/Telegram/SourceFiles/boxes/username_box.cpp b/Telegram/SourceFiles/boxes/username_box.cpp index 8e7ccd244..ded98183a 100644 --- a/Telegram/SourceFiles/boxes/username_box.cpp +++ b/Telegram/SourceFiles/boxes/username_box.cpp @@ -393,8 +393,12 @@ void UsernamesBox( editor->submitted( ) | rpl::start_with_next(finish, editor->lifetime()); - box->addButton(tr::lng_settings_save(), finish); - box->addButton(tr::lng_cancel(), [=] { box->closeBox(); }); + if (isBot) { + box->addButton(tr::lng_close(), [=] { box->closeBox(); }); + } else { + box->addButton(tr::lng_settings_save(), finish); + box->addButton(tr::lng_cancel(), [=] { box->closeBox(); }); + } } void AddUsernameCheckLabel(