diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 1ce2489af..e027f6da9 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -785,6 +785,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_settings_power_chat" = "Animations in Chats"; "lng_settings_power_chat_background" = "Background rotation"; "lng_settings_power_chat_spoiler" = "Animated spoiler effect"; +"lng_settings_power_chat_effects" = "Effects in messages"; "lng_settings_power_calls" = "Animations in Calls"; "lng_settings_power_ui" = "Interface animations"; "lng_settings_power_auto" = "Save Power on Low Battery"; diff --git a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp index de775e17d..456f97cd9 100644 --- a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp +++ b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp @@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lottie/lottie_common.h" #include "lottie/lottie_single_player.h" #include "base/random.h" +#include "ui/power_saving.h" #include "styles/style_chat.h" namespace HistoryView { @@ -155,7 +156,8 @@ void EmojiInteractions::play( } void EmojiInteractions::playEffectOnRead(not_null view) { - if (view->data()->markEffectWatched()) { + const auto flag = PowerSaving::Flag::kChatEffects; + if (view->data()->markEffectWatched() && !PowerSaving::On(flag)) { playEffect(view); } } diff --git a/Telegram/SourceFiles/settings/settings_power_saving.cpp b/Telegram/SourceFiles/settings/settings_power_saving.cpp index 4d523e07a..beaf46613 100644 --- a/Telegram/SourceFiles/settings/settings_power_saving.cpp +++ b/Telegram/SourceFiles/settings/settings_power_saving.cpp @@ -152,6 +152,7 @@ EditFlagsDescriptor PowerSavingLabels() { &st::menuIconChatBubble, }, { kChatSpoiler, tr::lng_settings_power_chat_spoiler(tr::now) }, + { kChatEffects, tr::lng_settings_power_chat_effects(tr::now) }, }; auto calls = std::vector