From 6e1ddef4fe81b6806e91c6351b6caecc48697fd8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 28 Aug 2024 17:45:29 +0400 Subject: [PATCH] Fix strings for group profile colors. --- Telegram/Resources/langs/lang.strings | 4 ++++ .../admin_log/history_admin_log_item.cpp | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 6aaaa555e..b6701988b 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -4478,6 +4478,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_admin_log_set_profile_background_emoji" = "{from} set channel profile background emoji to {emoji}"; "lng_admin_log_change_profile_background_emoji" = "{from} changed channel profile background emoji from {previous} to {emoji}"; "lng_admin_log_removed_profile_background_emoji" = "{from} removed channel profile background emoji {emoji}"; +"lng_admin_log_change_profile_color_group" = "{from} changed group profile color from {previous} to {color}"; +"lng_admin_log_set_profile_background_emoji_group" = "{from} set group profile background emoji to {emoji}"; +"lng_admin_log_change_profile_background_emoji_group" = "{from} changed group profile background emoji from {previous} to {emoji}"; +"lng_admin_log_removed_profile_background_emoji_group" = "{from} removed group profile background emoji {emoji}"; "lng_admin_log_change_wallpaper" = "{from} changed channel wallpaper"; "lng_admin_log_set_status" = "{from} set channel emoji status to {emoji}"; "lng_admin_log_change_status" = "{from} changed channel emoji status from {previous} to {emoji}"; diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index 73370795f..9d7ec26ff 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -1922,13 +1922,22 @@ void GenerateItems( }; const auto createChangeProfilePeerColor = [&](const LogChangeProfilePeerColor &data) { + const auto group = channel->isMegagroup(); createColorChange( data.vprev_value(), data.vnew_value(), - tr::lng_admin_log_change_profile_color, - tr::lng_admin_log_set_profile_background_emoji, - tr::lng_admin_log_removed_profile_background_emoji, - tr::lng_admin_log_change_profile_background_emoji); + (group + ? tr::lng_admin_log_change_profile_color_group + : tr::lng_admin_log_change_profile_color), + (group + ? tr::lng_admin_log_set_profile_background_emoji_group + : tr::lng_admin_log_set_profile_background_emoji), + (group + ? tr::lng_admin_log_removed_profile_background_emoji_group + : tr::lng_admin_log_removed_profile_background_emoji), + (group + ? tr::lng_admin_log_change_profile_background_emoji_group + : tr::lng_admin_log_change_profile_background_emoji)); }; const auto createChangeWallpaper = [&](const LogChangeWallpaper &data) {