summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Telegram/Resources/langs/lang.strings1
-rw-r--r--Telegram/SourceFiles/history/view/history_view_message.cpp2
-rw-r--r--Telegram/SourceFiles/info/profile/info_profile_badge.cpp3
-rw-r--r--Telegram/SourceFiles/settings/settings_power_saving.cpp1
-rw-r--r--Telegram/SourceFiles/settings/settings_premium.cpp2
-rw-r--r--Telegram/SourceFiles/ui/power_saving.h1
-rw-r--r--Telegram/SourceFiles/ui/unread_badge.cpp3
7 files changed, 9 insertions, 4 deletions
diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings
index 4465a9dae0..3071b81bf2 100644
--- a/Telegram/Resources/langs/lang.strings
+++ b/Telegram/Resources/langs/lang.strings
@@ -620,6 +620,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_settings_power_emoji_panel" = "Autoplay in panel";
"lng_settings_power_emoji_reactions" = "Autoplay in reactions menu";
"lng_settings_power_emoji_chat" = "Autoplay in messages";
+"lng_settings_power_emoji_status" = "Autoplay in premium status";
"lng_settings_power_chat" = "Animations in Chats";
"lng_settings_power_chat_background" = "Background rotation";
"lng_settings_power_chat_spoiler" = "Animated spoiler effect";
diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp
index e9c773ff93..01d654cd1d 100644
--- a/Telegram/SourceFiles/history/view/history_view_message.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_message.cpp
@@ -1272,7 +1272,7 @@ void Message::paintFromName(
.position = QPoint(
x - 2 * _fromNameStatus->skip,
y + _fromNameStatus->skip),
- .paused = context.paused,
+ .paused = context.paused || On(PowerSaving::kEmojiStatus),
});
} else {
st::dialogsPremiumIcon.paint(p, x, y, width(), color);
diff --git a/Telegram/SourceFiles/info/profile/info_profile_badge.cpp b/Telegram/SourceFiles/info/profile/info_profile_badge.cpp
index 00fb25cad6..46276ef5bc 100644
--- a/Telegram/SourceFiles/info/profile/info_profile_badge.cpp
+++ b/Telegram/SourceFiles/info/profile/info_profile_badge.cpp
@@ -96,7 +96,8 @@ void Badge::setBadge(BadgeType badge, DocumentId emojiStatusId) {
auto args = Ui::Text::CustomEmoji::Context{
.textColor = _st.premiumFg->c,
.now = crl::now(),
- .paused = _animationPaused && _animationPaused(),
+ .paused = ((_animationPaused && _animationPaused())
+ || On(PowerSaving::kEmojiStatus)),
};
if (!_emojiStatusPanel
|| !_emojiStatusPanel->paintBadgeFrame(check)) {
diff --git a/Telegram/SourceFiles/settings/settings_power_saving.cpp b/Telegram/SourceFiles/settings/settings_power_saving.cpp
index 37c58f87c1..21974c9a09 100644
--- a/Telegram/SourceFiles/settings/settings_power_saving.cpp
+++ b/Telegram/SourceFiles/settings/settings_power_saving.cpp
@@ -144,6 +144,7 @@ EditFlagsDescriptor<PowerSaving::Flags> PowerSavingLabels() {
},
{ kEmojiReactions, tr::lng_settings_power_emoji_reactions(tr::now) },
{ kEmojiChat, tr::lng_settings_power_emoji_chat(tr::now) },
+ { kEmojiStatus, tr::lng_settings_power_emoji_status(tr::now) },
};
auto chat = std::vector<Label>{
{
diff --git a/Telegram/SourceFiles/settings/settings_premium.cpp b/Telegram/SourceFiles/settings/settings_premium.cpp
index b9c7f78ad7..15cdd14dfc 100644
--- a/Telegram/SourceFiles/settings/settings_premium.cpp
+++ b/Telegram/SourceFiles/settings/settings_premium.cpp
@@ -560,7 +560,7 @@ void EmojiStatusTopBar::paint(QPainter &p) {
: QColor(0, 0, 0, 0)),
false,
crl::now(),
- _paused);
+ _paused || On(PowerSaving::kEmojiStatus));
p.drawImage(_rect.toRect(), frame.image);
if (!_paused) {
diff --git a/Telegram/SourceFiles/ui/power_saving.h b/Telegram/SourceFiles/ui/power_saving.h
index c3b0653759..6b3e289ea6 100644
--- a/Telegram/SourceFiles/ui/power_saving.h
+++ b/Telegram/SourceFiles/ui/power_saving.h
@@ -19,6 +19,7 @@ enum Flag : uint32 {
kChatBackground = (1U << 6),
kChatSpoiler = (1U << 7),
kCalls = (1U << 8),
+ kEmojiStatus = (1U << 9),
kAll = (1U << 9) - 1,
};
diff --git a/Telegram/SourceFiles/ui/unread_badge.cpp b/Telegram/SourceFiles/ui/unread_badge.cpp
index 5adba97501..8d1c09e744 100644
--- a/Telegram/SourceFiles/ui/unread_badge.cpp
+++ b/Telegram/SourceFiles/ui/unread_badge.cpp
@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_session.h"
#include "lang/lang_keys.h"
#include "ui/painter.h"
+#include "ui/power_saving.h"
#include "ui/unread_badge_paint.h"
#include "styles/style_dialogs.h"
@@ -195,7 +196,7 @@ int PeerBadge::drawGetWidth(
.position = QPoint(
iconx - 2 * _emojiStatus->skip,
icony + _emojiStatus->skip),
- .paused = descriptor.paused,
+ .paused = descriptor.paused || On(PowerSaving::kEmojiStatus),
});
return iconw - 4 * _emojiStatus->skip;
}