From 0ffd827fc5c09fa9f4bedf1e7ea2a53ecec5fea2 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 25 Dec 2021 18:23:23 +0300 Subject: [PATCH] Moved ellipsis string to lib_ui. --- .../history/admin_log/history_admin_log_item.cpp | 8 ++++---- Telegram/lib_ui | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index c99d59562..dd7bec909 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -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( 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, diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 774da18a3..0a0e5e125 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 774da18a386e9f0eda71331db22bc8e9b24bf44e +Subproject commit 0a0e5e12589d7918a31d60b100dc32de68ef2e8a