mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fixed phrase of global TTL for new chats.
This commit is contained in:
parent
0e3eddcb77
commit
9b7689993f
2 changed files with 11 additions and 6 deletions
|
@ -1529,6 +1529,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_action_ttl_changed_you" = "You set messages to auto-delete in {duration}";
|
"lng_action_ttl_changed_you" = "You set messages to auto-delete in {duration}";
|
||||||
"lng_action_ttl_changed_channel" = "New messages will auto-delete in {duration}";
|
"lng_action_ttl_changed_channel" = "New messages will auto-delete in {duration}";
|
||||||
"lng_action_ttl_global" = "{from} uses a self-destruct timer for all chats. All new messages in this chat will be automatically deleted after {duration} they've been sent.";
|
"lng_action_ttl_global" = "{from} uses a self-destruct timer for all chats. All new messages in this chat will be automatically deleted after {duration} they've been sent.";
|
||||||
|
"lng_action_ttl_global_me" = "You set a self-destruct timer for all chats. All new messages in this chat will be automatically deleted after {duration} they’ve been sent.";
|
||||||
"lng_action_ttl_removed" = "{from} has set messages not to auto-delete";
|
"lng_action_ttl_removed" = "{from} has set messages not to auto-delete";
|
||||||
"lng_action_ttl_removed_you" = "You disabled the auto-delete timer";
|
"lng_action_ttl_removed_you" = "You disabled the auto-delete timer";
|
||||||
"lng_action_ttl_removed_channel" = "New messages will not auto-delete";
|
"lng_action_ttl_removed_channel" = "New messages will not auto-delete";
|
||||||
|
|
|
@ -3676,20 +3676,24 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||||
const auto duration = (period == 5)
|
const auto duration = (period == 5)
|
||||||
? u"5 seconds"_q
|
? u"5 seconds"_q
|
||||||
: Ui::FormatTTL(period);
|
: Ui::FormatTTL(period);
|
||||||
if (const auto from = action.vauto_setting_from()) {
|
if (const auto from = action.vauto_setting_from(); from && period) {
|
||||||
if (const auto peer = _from->owner().peer(peerFromUser(*from))) {
|
if (const auto peer = _from->owner().peer(peerFromUser(*from))) {
|
||||||
if (!peer->isSelf() && period) {
|
result.text = (peer->id == peer->session().userPeerId())
|
||||||
result.text = tr::lng_action_ttl_global(
|
? tr::lng_action_ttl_global_me(
|
||||||
|
tr::now,
|
||||||
|
lt_duration,
|
||||||
|
{ .text = duration },
|
||||||
|
Ui::Text::WithEntities)
|
||||||
|
: tr::lng_action_ttl_global(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_from,
|
lt_from,
|
||||||
fromLinkText(), // Link 1.
|
Ui::Text::Link(peer->name(), 1), // Link 1.
|
||||||
lt_duration,
|
lt_duration,
|
||||||
{ .text = duration },
|
{ .text = duration },
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (isPost()) {
|
if (isPost()) {
|
||||||
if (!period) {
|
if (!period) {
|
||||||
result.text = tr::lng_action_ttl_removed_channel(
|
result.text = tr::lng_action_ttl_removed_channel(
|
||||||
|
|
Loading…
Add table
Reference in a new issue