Removed Save button from box for bot username editing.

This commit is contained in:
23rd 2023-07-28 02:44:20 +03:00
parent 73373e373f
commit 4017d8db7c
2 changed files with 7 additions and 3 deletions

View File

@ -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?";

View File

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