mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Moved ellipsis string to lib_ui.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user