diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index cf6ce63c407d20..b1ef417a1fc4e8 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -896,6 +896,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_settings_power_emoji_status" = "Autoplay in premium status"; "lng_settings_power_chat" = "Animations in Chats"; "lng_settings_power_chat_background" = "Wallpaper rotation"; +"lng_settings_power_chat_media" = "Autoplay media"; "lng_settings_power_chat_spoiler" = "Animated spoiler effect"; "lng_settings_power_chat_effects" = "Effects in messages"; "lng_settings_power_calls" = "Animations in Calls"; diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index c30410c49c5367..51d0632c4aac69 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -537,7 +537,7 @@ void Gif::draw(Painter &p, const PaintContext &context) const { == PaintContext::SkipDrawingParts::Content; const auto drawStreamed = streamed && (shouldBePlaying || !_videoCover); if (drawStreamed && !skipDrawingContent && !fullHiddenBySpoiler) { - auto paused = context.paused || !shouldBePlaying; + auto paused = context.paused || !shouldBePlaying || On(PowerSaving::kChatMedia); auto request = ::Media::Streaming::FrameRequest{ .outer = QSize(usew, painth) * style::DevicePixelRatio(), .blurredBackground = true, diff --git a/Telegram/SourceFiles/settings/settings_power_saving.cpp b/Telegram/SourceFiles/settings/settings_power_saving.cpp index d026fb9231912e..6f98a476c47410 100644 --- a/Telegram/SourceFiles/settings/settings_power_saving.cpp +++ b/Telegram/SourceFiles/settings/settings_power_saving.cpp @@ -165,6 +165,7 @@ EditFlagsDescriptor PowerSavingLabels() { }, { kChatSpoiler, tr::lng_settings_power_chat_spoiler(tr::now) }, { kChatEffects, tr::lng_settings_power_chat_effects(tr::now) }, + { kChatMedia, tr::lng_settings_power_chat_media(tr::now) }, }; auto calls = std::vector