From 9fff7f9eda99927098647d8edecb753a6fc17957 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 11 Oct 2022 21:12:22 +0800 Subject: [PATCH] feat: can disable premium star in chat --- .../src/main/java/org/telegram/ui/Cells/ChatMessageCell.java | 3 +++ TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java index 84ab9ddc2..ffab414f0 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -11710,6 +11710,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } private Object getAuthorStatus() { + if (!NaConfig.INSTANCE.getShowPremiumStarInChat().Bool()) { + return null; + } if (currentUser != null) { if (currentUser.emoji_status instanceof TLRPC.TL_emojiStatusUntil && ((TLRPC.TL_emojiStatusUntil) currentUser.emoji_status).until > (int) (System.currentTimeMillis() / 1000)) { return ((TLRPC.TL_emojiStatusUntil) currentUser.emoji_status).document_id; diff --git a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt index 60ed46250..6bce546b7 100644 --- a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt +++ b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt @@ -196,7 +196,7 @@ object NaConfig { addConfig( "ShowPremiumStarInChat", ConfigItem.configTypeBool, - false + true ) val showPremiumAvatarAnimation = addConfig(