Improved "Create link" box title display.

This commit is contained in:
23rd 2019-02-12 22:09:24 +03:00 committed by John Preston
parent 9d8b80cbce
commit 19bbccd1a7
2 changed files with 5 additions and 2 deletions

View File

@ -1409,7 +1409,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_menu_formatting_link_edit" = "Edit link";
"lng_menu_formatting_clear" = "Plain text";
"lng_formatting_link_create_title" = "Create link";
"lng_formatting_link_edit_title" = "Create link";
"lng_formatting_link_edit_title" = "Edit link";
"lng_formatting_link_text" = "Text";
"lng_formatting_link_url" = "URL";
"lng_formatting_link_create" = "Create";

View File

@ -155,7 +155,10 @@ void EditLinkBox::prepare() {
}
});
setTitle(langFactory(lng_formatting_link_create_title));
const auto title = url->getLastText().isEmpty()
? lng_formatting_link_create_title
: lng_formatting_link_edit_title;
setTitle(langFactory(title));
addButton(langFactory(lng_formatting_link_create), submit);
addButton(langFactory(lng_cancel), [=] { closeBox(); });