mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Make whole same-background message clickable.
This commit is contained in:
@@ -1523,9 +1523,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_action_attach_menu_bot_allowed" = "You allowed this bot to message you when you added it in the attachment menu.";
|
||||
"lng_action_set_wallpaper_me" = "You set a new background for this chat.";
|
||||
"lng_action_set_wallpaper" = "{user} set a new background for this chat.";
|
||||
"lng_action_set_same_wallpaper_me" = "You set {background} for this chat.";
|
||||
"lng_action_set_same_wallpaper" = "{user} set {background} for this chat.";
|
||||
"lng_action_set_same_background" = "the same background";
|
||||
"lng_action_set_same_wallpaper_me" = "You set the same background for this chat.";
|
||||
"lng_action_set_same_wallpaper" = "{user} set the same background for this chat.";
|
||||
"lng_action_topic_created_inside" = "Topic created";
|
||||
"lng_action_topic_closed_inside" = "Topic closed";
|
||||
"lng_action_topic_reopened_inside" = "Topic reopened";
|
||||
|
||||
@@ -4193,21 +4193,14 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||
if (!isSelf) {
|
||||
result.links.push_back(peer->createOpenLink());
|
||||
}
|
||||
if (const auto dependent = GetServiceDependentData()) {
|
||||
result.links.push_back(dependent->lnk);
|
||||
}
|
||||
result.text = isSelf
|
||||
? tr::lng_action_set_same_wallpaper(
|
||||
tr::now,
|
||||
lt_user,
|
||||
Ui::Text::Link(name, 1), // Link 1.
|
||||
lt_background,
|
||||
Ui::Text::Link(tr::lng_action_set_same_background(tr::now), 2),
|
||||
Ui::Text::WithEntities)
|
||||
: tr::lng_action_set_same_wallpaper_me(
|
||||
tr::now,
|
||||
lt_background,
|
||||
Ui::Text::Link(tr::lng_action_set_same_background(tr::now), 1),
|
||||
Ui::Text::WithEntities);
|
||||
return result;
|
||||
};
|
||||
|
||||
@@ -652,6 +652,8 @@ TextState Service::textState(QPoint point, StateRequest request) const {
|
||||
if (TTLMenu::TTLValidator(nullptr, history()->peer).can()) {
|
||||
result.link = ttl->link;
|
||||
}
|
||||
} else if (const auto same = item->Get<HistoryServiceSameBackground>()) {
|
||||
result.link = same->lnk;
|
||||
}
|
||||
}
|
||||
} else if (media) {
|
||||
|
||||
Reference in New Issue
Block a user