Moved ellipsis string to lib_ui.

This commit is contained in:
23rd 2021-12-25 18:23:23 +03:00 committed by John Preston
parent c40bcdc446
commit 0ffd827fc5
2 changed files with 5 additions and 5 deletions

View file

@ -321,7 +321,7 @@ QString GenerateInviteLinkText(const MTPExportedChatInvite &data) {
QString GenerateInviteLinkLink(const MTPExportedChatInvite &data) {
const auto text = GenerateInviteLinkText(data);
return text.endsWith("...")
return text.endsWith(Ui::kQEllipsis)
? text
: textcmdLink(InternalInviteLinkUrl(data), text);
}
@ -330,7 +330,7 @@ TextWithEntities GenerateInviteLinkChangeText(
const MTPExportedChatInvite &newLink,
const MTPExportedChatInvite &prevLink) {
auto link = TextWithEntities{ GenerateInviteLinkText(newLink) };
if (!link.text.endsWith("...")) {
if (!link.text.endsWith(Ui::kQEllipsis)) {
link.entities.push_back({
EntityType::CustomUrl,
0,
@ -1203,7 +1203,7 @@ void GenerateItems(
ClickHandlerPtr additional = nullptr) {
auto message = HistoryService::PreparedText{ text };
message.links.push_back(fromLink);
if (!ExtractInviteLink(data).endsWith("...")) {
if (!ExtractInviteLink(data).endsWith(Ui::kQEllipsis)) {
message.links.push_back(std::make_shared<UrlClickHandler>(
InternalInviteLinkUrl(data)));
}
@ -1332,7 +1332,7 @@ void GenerateItems(
? tr::lng_admin_log_participant_approved_by_link
: tr::lng_admin_log_participant_approved_by_link_channel);
const auto linkText = GenerateInviteLinkLink(data.vinvite());
const auto adminIndex = linkText.endsWith("...") ? 2 : 3;
const auto adminIndex = linkText.endsWith(Ui::kQEllipsis) ? 2 : 3;
addInviteLinkServiceMessage(
text(
tr::now,

@ -1 +1 @@
Subproject commit 774da18a386e9f0eda71331db22bc8e9b24bf44e
Subproject commit 0a0e5e12589d7918a31d60b100dc32de68ef2e8a