Make whole same-background message clickable.
This commit is contained in:
parent
9600cc0ed5
commit
7c11fd58cf
|
@ -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_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_me" = "You set a new background for this chat.";
|
||||||
"lng_action_set_wallpaper" = "{user} 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_me" = "You set the same background for this chat.";
|
||||||
"lng_action_set_same_wallpaper" = "{user} set {background} for this chat.";
|
"lng_action_set_same_wallpaper" = "{user} set the same background for this chat.";
|
||||||
"lng_action_set_same_background" = "the same background";
|
|
||||||
"lng_action_topic_created_inside" = "Topic created";
|
"lng_action_topic_created_inside" = "Topic created";
|
||||||
"lng_action_topic_closed_inside" = "Topic closed";
|
"lng_action_topic_closed_inside" = "Topic closed";
|
||||||
"lng_action_topic_reopened_inside" = "Topic reopened";
|
"lng_action_topic_reopened_inside" = "Topic reopened";
|
||||||
|
|
|
@ -4193,21 +4193,14 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||||
if (!isSelf) {
|
if (!isSelf) {
|
||||||
result.links.push_back(peer->createOpenLink());
|
result.links.push_back(peer->createOpenLink());
|
||||||
}
|
}
|
||||||
if (const auto dependent = GetServiceDependentData()) {
|
|
||||||
result.links.push_back(dependent->lnk);
|
|
||||||
}
|
|
||||||
result.text = isSelf
|
result.text = isSelf
|
||||||
? tr::lng_action_set_same_wallpaper(
|
? tr::lng_action_set_same_wallpaper(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
Ui::Text::Link(name, 1), // Link 1.
|
Ui::Text::Link(name, 1), // Link 1.
|
||||||
lt_background,
|
|
||||||
Ui::Text::Link(tr::lng_action_set_same_background(tr::now), 2),
|
|
||||||
Ui::Text::WithEntities)
|
Ui::Text::WithEntities)
|
||||||
: tr::lng_action_set_same_wallpaper_me(
|
: tr::lng_action_set_same_wallpaper_me(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_background,
|
|
||||||
Ui::Text::Link(tr::lng_action_set_same_background(tr::now), 1),
|
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
|
@ -652,6 +652,8 @@ TextState Service::textState(QPoint point, StateRequest request) const {
|
||||||
if (TTLMenu::TTLValidator(nullptr, history()->peer).can()) {
|
if (TTLMenu::TTLValidator(nullptr, history()->peer).can()) {
|
||||||
result.link = ttl->link;
|
result.link = ttl->link;
|
||||||
}
|
}
|
||||||
|
} else if (const auto same = item->Get<HistoryServiceSameBackground>()) {
|
||||||
|
result.link = same->lnk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (media) {
|
} else if (media) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user