2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Copy text with expanded links only to external.

Paste valid custom links in message field if copied from messages.
This commit is contained in:
John Preston
2019-04-08 19:10:06 +04:00
parent 0f0c3b7461
commit b5be6df5e2
64 changed files with 772 additions and 647 deletions

View File

@@ -73,21 +73,21 @@ void ConfirmSwitchBox::prepare() {
setTitle(langFactory(lng_language_switch_title));
auto link = TextWithEntities{ lang(lng_language_switch_link) };
link.entities.push_back(EntityInText(
EntityInTextCustomUrl,
link.entities.push_back({
EntityType::CustomUrl,
0,
link.text.size(),
QString("internal:go_to_translations")));
QString("internal:go_to_translations") });
auto name = TextWithEntities{ _name };
name.entities.push_back(EntityInText(
EntityInTextBold,
name.entities.push_back({
EntityType::Bold,
0,
name.text.size()));
name.text.size() });
auto percent = TextWithEntities{ QString::number(_percent) };
percent.entities.push_back(EntityInText(
EntityInTextBold,
percent.entities.push_back({
EntityType::Bold,
0,
percent.text.size()));
percent.text.size() });
const auto text = (_official
? lng_language_switch_about_official__generic<TextWithEntities>
: lng_language_switch_about_unofficial__generic<TextWithEntities>)(
@@ -134,11 +134,11 @@ void NotReadyBox::prepare() {
setTitle(langFactory(lng_language_not_ready_title));
auto link = TextWithEntities{ lang(lng_language_not_ready_link) };
link.entities.push_back(EntityInText(
EntityInTextCustomUrl,
link.entities.push_back({
EntityType::CustomUrl,
0,
link.text.size(),
QString("internal:go_to_translations")));
QString("internal:go_to_translations") });
auto name = TextWithEntities{ _name };
const auto text = lng_language_not_ready_about__generic(
lt_lang_name,