Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Telegram/Resources/langs/lang.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/settings/settings_power_saving.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ EditFlagsDescriptor<PowerSaving::Flags> 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<Label>{
{
Expand Down
3 changes: 2 additions & 1 deletion Telegram/SourceFiles/ui/power_saving.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ enum Flag : uint32 {
kCalls = (1U << 8),
kEmojiStatus = (1U << 9),
kChatEffects = (1U << 10),
kChatMedia = (1U << 11),

kAll = (1U << 11) - 1,
kAll = (1U << 12) - 1,
};
inline constexpr bool is_flag_type(Flag) { return true; }
using Flags = base::flags<Flag>;
Expand Down
Loading