mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Improve color/emoji admin log events.
This commit is contained in:
parent
d47b99b0b5
commit
c8660b5385
2 changed files with 39 additions and 7 deletions
|
@ -3519,8 +3519,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_admin_log_participant_volume_channel" = "{from} changed live stream volume for {user} to {percent}";
|
"lng_admin_log_participant_volume_channel" = "{from} changed live stream volume for {user} to {percent}";
|
||||||
"lng_admin_log_antispam_enabled" = "{from} enabled aggressive anti-spam";
|
"lng_admin_log_antispam_enabled" = "{from} enabled aggressive anti-spam";
|
||||||
"lng_admin_log_antispam_disabled" = "{from} disabled aggressive anti-spam";
|
"lng_admin_log_antispam_disabled" = "{from} disabled aggressive anti-spam";
|
||||||
"lng_admin_log_change_color" = "{from} changed color";
|
"lng_admin_log_change_color" = "{from} changed channel color from {previous} to {color}";
|
||||||
"lng_admin_log_change_background_emoji" = "{from} changed background emoji";
|
"lng_admin_log_set_background_emoji" = "{from} set channel background emoji to {emoji}";
|
||||||
|
"lng_admin_log_change_background_emoji" = "{from} changed channel background emoji from {previous} to {emoji}";
|
||||||
|
"lng_admin_log_removed_background_emoji" = "{from} removed channel background emoji {emoji}";
|
||||||
"lng_admin_log_user_with_username" = "{name} ({mention})";
|
"lng_admin_log_user_with_username" = "{name} ({mention})";
|
||||||
"lng_admin_log_messages_ttl_set" = "{from} enabled messages auto-delete after {duration}";
|
"lng_admin_log_messages_ttl_set" = "{from} enabled messages auto-delete after {duration}";
|
||||||
"lng_admin_log_messages_ttl_changed" = "{from} changed messages auto-delete period from {previous} to {duration}";
|
"lng_admin_log_messages_ttl_changed" = "{from} changed messages auto-delete period from {previous} to {duration}";
|
||||||
|
|
|
@ -1822,16 +1822,46 @@ void GenerateItems(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_from,
|
lt_from,
|
||||||
fromLinkText,
|
fromLinkText,
|
||||||
|
lt_previous,
|
||||||
|
{ '#' + QString::number(data.vprev_value().v + 1) },
|
||||||
|
lt_color,
|
||||||
|
{ '#' + QString::number(data.vnew_value().v + 1) },
|
||||||
Ui::Text::WithEntities);
|
Ui::Text::WithEntities);
|
||||||
addSimpleServiceMessage(text);
|
addSimpleServiceMessage(text);
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto createChangeBackgroundEmoji = [&](const LogChangeBackgroundEmoji &data) {
|
const auto createChangeBackgroundEmoji = [&](const LogChangeBackgroundEmoji &data) {
|
||||||
const auto text = tr::lng_admin_log_change_background_emoji(
|
const auto was = data.vprev_value().v;
|
||||||
tr::now,
|
const auto now = data.vnew_value().v;
|
||||||
lt_from,
|
const auto text = !was
|
||||||
fromLinkText,
|
? tr::lng_admin_log_set_background_emoji(
|
||||||
Ui::Text::WithEntities);
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
fromLinkText,
|
||||||
|
lt_emoji,
|
||||||
|
Ui::Text::SingleCustomEmoji(
|
||||||
|
Data::SerializeCustomEmojiId(now)),
|
||||||
|
Ui::Text::WithEntities)
|
||||||
|
: !now
|
||||||
|
? tr::lng_admin_log_removed_background_emoji(
|
||||||
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
fromLinkText,
|
||||||
|
lt_emoji,
|
||||||
|
Ui::Text::SingleCustomEmoji(
|
||||||
|
Data::SerializeCustomEmojiId(was)),
|
||||||
|
Ui::Text::WithEntities)
|
||||||
|
: tr::lng_admin_log_change_background_emoji(
|
||||||
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
fromLinkText,
|
||||||
|
lt_previous,
|
||||||
|
Ui::Text::SingleCustomEmoji(
|
||||||
|
Data::SerializeCustomEmojiId(was)),
|
||||||
|
lt_emoji,
|
||||||
|
Ui::Text::SingleCustomEmoji(
|
||||||
|
Data::SerializeCustomEmojiId(now)),
|
||||||
|
Ui::Text::WithEntities);
|
||||||
addSimpleServiceMessage(text);
|
addSimpleServiceMessage(text);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue