2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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

@@ -253,11 +253,11 @@ void SettingsWidget::addLocationLabel(
QDir::toNativeSeparators(text),
EntitiesInText()
};
pathLink.entities.push_back(EntityInText(
EntityInTextCustomUrl,
pathLink.entities.push_back({
EntityType::CustomUrl,
0,
text.size(),
QString("internal:edit_export_path")));
QString("internal:edit_export_path") });
return lng_export_option_location__generic<TextWithEntities>(
lt_path,
pathLink);
@@ -288,17 +288,17 @@ void SettingsWidget::addLimitsLabel(
? langDayOfMonthFull(ParseDateTime(till).date())
: lang(lng_export_end);
auto fromLink = TextWithEntities{ begin };
fromLink.entities.push_back(EntityInText(
EntityInTextCustomUrl,
fromLink.entities.push_back({
EntityType::CustomUrl,
0,
begin.size(),
QString("internal:edit_from")));
QString("internal:edit_from") });
auto tillLink = TextWithEntities{ end };
tillLink.entities.push_back(EntityInText(
EntityInTextCustomUrl,
tillLink.entities.push_back({
EntityType::CustomUrl,
0,
end.size(),
QString("internal:edit_till")));
QString("internal:edit_till") });
return lng_export_limits__generic<TextWithEntities>(
lt_from,
fromLink,