mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Replaced universal initializers with constructors in Ui::Text::Link.
This commit is contained in:
parent
bef20ba4a2
commit
20c911651f
3 changed files with 13 additions and 13 deletions
|
@ -318,7 +318,7 @@ void ProxyRow::updateFields(View &&view) {
|
||||||
TextWithEntities()
|
TextWithEntities()
|
||||||
.append(_view.type)
|
.append(_view.type)
|
||||||
.append(' ')
|
.append(' ')
|
||||||
.append(Ui::Text::Link(endpoint, {})),
|
.append(Ui::Text::Link(endpoint, QString())),
|
||||||
Ui::ItemTextDefaultOptions());
|
Ui::ItemTextDefaultOptions());
|
||||||
|
|
||||||
const auto state = _view.state;
|
const auto state = _view.state;
|
||||||
|
|
|
@ -675,7 +675,7 @@ void GenerateItems(
|
||||||
|
|
||||||
const auto fromName = from->name;
|
const auto fromName = from->name;
|
||||||
const auto fromLink = from->createOpenLink();
|
const auto fromLink = from->createOpenLink();
|
||||||
const auto fromLinkText = Ui::Text::Link(fromName, {});
|
const auto fromLinkText = Ui::Text::Link(fromName, QString());
|
||||||
|
|
||||||
const auto addSimpleServiceMessage = [&](
|
const auto addSimpleServiceMessage = [&](
|
||||||
const TextWithEntities &text,
|
const TextWithEntities &text,
|
||||||
|
@ -987,7 +987,7 @@ void GenerateItems(
|
||||||
lt_sticker_set,
|
lt_sticker_set,
|
||||||
Ui::Text::Link(
|
Ui::Text::Link(
|
||||||
tr::lng_admin_log_changed_stickers_set(tr::now),
|
tr::lng_admin_log_changed_stickers_set(tr::now),
|
||||||
{}),
|
QString()),
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
const auto setLink = std::make_shared<LambdaClickHandler>([=](
|
const auto setLink = std::make_shared<LambdaClickHandler>([=](
|
||||||
ClickContext context) {
|
ClickContext context) {
|
||||||
|
@ -1072,7 +1072,7 @@ void GenerateItems(
|
||||||
lt_from,
|
lt_from,
|
||||||
fromLinkText,
|
fromLinkText,
|
||||||
lt_chat,
|
lt_chat,
|
||||||
Ui::Text::Link(now->name, {}),
|
Ui::Text::Link(now->name, QString()),
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
const auto chatLink = std::make_shared<LambdaClickHandler>([=] {
|
const auto chatLink = std::make_shared<LambdaClickHandler>([=] {
|
||||||
Ui::showPeerHistory(now, ShowAtUnreadMsgId);
|
Ui::showPeerHistory(now, ShowAtUnreadMsgId);
|
||||||
|
@ -1196,7 +1196,7 @@ void GenerateItems(
|
||||||
const auto participantPeerLink = participantPeer->createOpenLink();
|
const auto participantPeerLink = participantPeer->createOpenLink();
|
||||||
const auto participantPeerLinkText = Ui::Text::Link(
|
const auto participantPeerLinkText = Ui::Text::Link(
|
||||||
participantPeer->name,
|
participantPeer->name,
|
||||||
{});
|
QString());
|
||||||
const auto text = (broadcast
|
const auto text = (broadcast
|
||||||
? tr::lng_admin_log_muted_participant_channel
|
? tr::lng_admin_log_muted_participant_channel
|
||||||
: tr::lng_admin_log_muted_participant)(
|
: tr::lng_admin_log_muted_participant)(
|
||||||
|
@ -1215,7 +1215,7 @@ void GenerateItems(
|
||||||
const auto participantPeerLink = participantPeer->createOpenLink();
|
const auto participantPeerLink = participantPeer->createOpenLink();
|
||||||
const auto participantPeerLinkText = Ui::Text::Link(
|
const auto participantPeerLinkText = Ui::Text::Link(
|
||||||
participantPeer->name,
|
participantPeer->name,
|
||||||
{});
|
QString());
|
||||||
const auto text = (broadcast
|
const auto text = (broadcast
|
||||||
? tr::lng_admin_log_unmuted_participant_channel
|
? tr::lng_admin_log_unmuted_participant_channel
|
||||||
: tr::lng_admin_log_unmuted_participant)(
|
: tr::lng_admin_log_unmuted_participant)(
|
||||||
|
@ -1319,7 +1319,7 @@ void GenerateItems(
|
||||||
const auto participantPeerLink = participantPeer->createOpenLink();
|
const auto participantPeerLink = participantPeer->createOpenLink();
|
||||||
const auto participantPeerLinkText = Ui::Text::Link(
|
const auto participantPeerLinkText = Ui::Text::Link(
|
||||||
participantPeer->name,
|
participantPeer->name,
|
||||||
{});
|
QString());
|
||||||
const auto volume = data.vparticipant().match([&](
|
const auto volume = data.vparticipant().match([&](
|
||||||
const MTPDgroupCallParticipant &data) {
|
const MTPDgroupCallParticipant &data) {
|
||||||
return data.vvolume().value_or(10000);
|
return data.vvolume().value_or(10000);
|
||||||
|
@ -1395,7 +1395,7 @@ void GenerateItems(
|
||||||
lt_link,
|
lt_link,
|
||||||
linkText,
|
linkText,
|
||||||
lt_user,
|
lt_user,
|
||||||
Ui::Text::Link(user->name, {}),
|
Ui::Text::Link(user->name, QString()),
|
||||||
Ui::Text::WithEntities),
|
Ui::Text::WithEntities),
|
||||||
data.vinvite(),
|
data.vinvite(),
|
||||||
user->createOpenLink());
|
user->createOpenLink());
|
||||||
|
|
|
@ -143,7 +143,7 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||||
auto user = history()->owner().user(users[i].v);
|
auto user = history()->owner().user(users[i].v);
|
||||||
result.links.push_back(user->createOpenLink());
|
result.links.push_back(user->createOpenLink());
|
||||||
|
|
||||||
auto linkText = Ui::Text::Link(user->name, {});
|
auto linkText = Ui::Text::Link(user->name, QString());
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
result.text = linkText;
|
result.text = linkText;
|
||||||
} else if (i + 1 == l) {
|
} else if (i + 1 == l) {
|
||||||
|
@ -964,7 +964,7 @@ HistoryService::PreparedText HistoryService::prepareGameScoreText() {
|
||||||
column,
|
column,
|
||||||
gamescore->msg->fullId()));
|
gamescore->msg->fullId()));
|
||||||
auto titleText = game->title;
|
auto titleText = game->title;
|
||||||
return Ui::Text::Link(titleText, {});
|
return Ui::Text::Link(titleText, QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tr::lng_deleted_message(tr::now, Ui::Text::WithEntities);
|
return tr::lng_deleted_message(tr::now, Ui::Text::WithEntities);
|
||||||
|
@ -1027,7 +1027,7 @@ HistoryService::PreparedText HistoryService::preparePaymentSentText() {
|
||||||
if (payment->msg) {
|
if (payment->msg) {
|
||||||
if (const auto media = payment->msg->media()) {
|
if (const auto media = payment->msg->media()) {
|
||||||
if (const auto invoice = media->invoice()) {
|
if (const auto invoice = media->invoice()) {
|
||||||
return Ui::Text::Link(invoice->title, {});
|
return Ui::Text::Link(invoice->title, QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1519,7 +1519,7 @@ HistoryService::PreparedText GenerateJoinedText(
|
||||||
: tr::lng_action_add_you)(
|
: tr::lng_action_add_you)(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_from,
|
lt_from,
|
||||||
Ui::Text::Link(inviter->name, {}),
|
Ui::Text::Link(inviter->name, QString()),
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
return result;
|
return result;
|
||||||
} else if (history->peer->isMegagroup()) {
|
} else if (history->peer->isMegagroup()) {
|
||||||
|
@ -1534,7 +1534,7 @@ HistoryService::PreparedText GenerateJoinedText(
|
||||||
result.text = tr::lng_action_user_joined(
|
result.text = tr::lng_action_user_joined(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_from,
|
lt_from,
|
||||||
Ui::Text::Link(self->name, {}),
|
Ui::Text::Link(self->name, QString()),
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue