From 3f2cf9aa47b8467097f4d2d9fd411a98c67ee3d7 Mon Sep 17 00:00:00 2001 From: Nikita S Date: Sat, 4 Feb 2023 19:34:51 +0100 Subject: [PATCH 1/6] looks like tg team fixed bug in C code finally they can if they want :) --- TMessagesProj/jni/tgnet/ConnectionsManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TMessagesProj/jni/tgnet/ConnectionsManager.cpp b/TMessagesProj/jni/tgnet/ConnectionsManager.cpp index 5ff3f0d2efc..0edd3d59a5f 100644 --- a/TMessagesProj/jni/tgnet/ConnectionsManager.cpp +++ b/TMessagesProj/jni/tgnet/ConnectionsManager.cpp @@ -884,8 +884,8 @@ void ConnectionsManager::onConnectionDataReceived(Connection *connection, Native if (datacenter->isHandshaking(connection->isMediaConnection)) { datacenter->processHandshakeResponse(connection->isMediaConnection, object, messageId); } else { - processServerResponse(object, messageId, 0, 0, connection, 0, 0); - connection->addProcessedMessageId(messageId); + connection->reconnect(); + return; } lastProtocolUsefullData = true; connection->setHasUsefullData(); From a63b18e351f3254dc3b58197112f828bddd99c67 Mon Sep 17 00:00:00 2001 From: Nikita S Date: Sat, 4 Feb 2023 21:12:17 +0100 Subject: [PATCH 2/6] disable premoji small & large --- .../telegram/ui/Cells/ChatMessageCell.java | 28 ++++++++++++++----- .../java/org/telegram/ui/ChatActivity.java | 4 +-- .../ui/Components/BulletinFactory.java | 1 + .../MessageContainsEmojiButton.java | 9 ++---- .../ui/Components/ReactedUsersListView.java | 6 +++- 5 files changed, 31 insertions(+), 17 deletions(-) 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 9903a926987..d4bf1dee661 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -3717,6 +3717,7 @@ private ArrayList getRecentRepliers() { } public void updateAnimatedEmojis() { + if (MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false)) return; if (!imageReceiversAttachState) { return; } @@ -4009,6 +4010,7 @@ private void checkImageReceiversAttachState() { if (currentMessageObject != null && !currentMessageObject.mediaExists) { int canDownload = DownloadController.getInstance(currentAccount).canDownloadMedia(currentMessageObject.messageOwner); TLRPC.Document document = currentMessageObject.getDocument(); + if (MessageObject.isAnimatedStickerDocument(document, true)) return; boolean loadDocumentFromImageReceiver = MessageObject.isStickerDocument(document) || MessageObject.isAnimatedStickerDocument(document, true) || MessageObject.isGifDocument(document) || MessageObject.isRoundVideoDocument(document); if (!loadDocumentFromImageReceiver) { TLRPC.PhotoSize photo = document == null ? FileLoader.getClosestPhotoSizeWithSize(currentMessageObject.photoThumbs, AndroidUtilities.getPhotoSize()) : null; @@ -4026,9 +4028,11 @@ private void checkImageReceiversAttachState() { updateButtonState(false, false, false); } } - animatedEmojiReplyStack = AnimatedEmojiSpan.update(AnimatedEmojiDrawable.CACHE_TYPE_MESSAGES, this, false, animatedEmojiReplyStack, replyTextLayout); - animatedEmojiDescriptionStack = AnimatedEmojiSpan.update(AnimatedEmojiDrawable.CACHE_TYPE_MESSAGES, this, false, animatedEmojiDescriptionStack, descriptionLayout); - updateAnimatedEmojis(); + if(!MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false)){ + animatedEmojiReplyStack = AnimatedEmojiSpan.update(AnimatedEmojiDrawable.CACHE_TYPE_MESSAGES, this, false, animatedEmojiReplyStack, replyTextLayout); + animatedEmojiDescriptionStack = AnimatedEmojiSpan.update(AnimatedEmojiDrawable.CACHE_TYPE_MESSAGES, this, false, animatedEmojiDescriptionStack, descriptionLayout); + updateAnimatedEmojis(); + } } else { radialProgress.onDetachedFromWindow(); videoRadialProgress.onDetachedFromWindow(); @@ -4049,6 +4053,7 @@ private void checkImageReceiversAttachState() { if (currentMessageObject != null && !currentMessageObject.mediaExists && !currentMessageObject.putInDownloadsStore && !DownloadController.getInstance(currentAccount).isDownloading(currentMessageObject.messageOwner.id)) { TLRPC.Document document = currentMessageObject.getDocument(); + if (MessageObject.isAnimatedStickerDocument(document, true)) return; boolean loadDocumentFromImageReceiver = MessageObject.isStickerDocument(document) || MessageObject.isAnimatedStickerDocument(document, true) || MessageObject.isGifDocument(document) || MessageObject.isRoundVideoDocument(document); if (!loadDocumentFromImageReceiver) { if (document != null) { @@ -4061,9 +4066,11 @@ private void checkImageReceiversAttachState() { } } } - AnimatedEmojiSpan.release(this, animatedEmojiDescriptionStack); - AnimatedEmojiSpan.release(this, animatedEmojiReplyStack); - AnimatedEmojiSpan.release(this, animatedEmojiStack); + if(!MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false)) { + AnimatedEmojiSpan.release(this, animatedEmojiDescriptionStack); + AnimatedEmojiSpan.release(this, animatedEmojiReplyStack); + AnimatedEmojiSpan.release(this, animatedEmojiStack); + } } } @@ -6419,7 +6426,14 @@ private void setMessageContent(MessageObject messageObject, MessageObject.Groupe if (!(drawTopic && (currentMessageObject != null && currentMessageObject.replyMessageObject != null || forwardedNameLayout != null && forwardedNameLayout[0] != null))) { additionHeight -= AndroidUtilities.dp(17); } - } else if (!MessagesController.getGlobalTelegraherSettings().getBoolean("HideStickers", false) && messageObject.isAnyKindOfSticker()) { + } else if ( + !MessagesController.getGlobalTelegraherSettings().getBoolean("HideStickers", false) && messageObject.isAnyKindOfSticker() + && + !( + MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false) + && messageObject.isAnimatedAnimatedEmoji() + ) + ) { drawBackground = false; boolean isWebpSticker = messageObject.type == MessageObject.TYPE_STICKER; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 92f645d1cdf..4e0e0b98490 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -23882,7 +23882,7 @@ public void onSwipeBackProgress(PopupSwipeBackLayout layout, float toProgress, f } } - if (stickerSets.size() > 0 && !getMessagesController().premiumLocked) { + if (!MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false) && stickerSets.size() > 0 && !getMessagesController().premiumLocked) { View gap = new FrameLayout(contentView.getContext()); gap.setBackgroundColor(getThemedColor(Theme.key_actionBarDefaultSubmenuSeparator)); popupLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8)); @@ -27338,7 +27338,7 @@ public void didPressUrl(ChatMessageCell cell, final CharacterStyle url, boolean @Override public boolean didPressAnimatedEmoji(ChatMessageCell cell, AnimatedEmojiSpan span) { - if (getMessagesController().premiumLocked || span == null || span.standard) { + if (MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false) || getMessagesController().premiumLocked || span == null || span.standard) { return false; } long documentId = span.getDocumentId(); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java index d7f9d5e3223..4b2ff9595f2 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/BulletinFactory.java @@ -323,6 +323,7 @@ public Bulletin createEmojiLoadingBulletin(TLRPC.Document document, CharSequence } public Bulletin createContainsEmojiBulletin(TLRPC.Document document, boolean inTopic, Utilities.Callback openSet) { + if (MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false)) return null; TLRPC.InputStickerSet inputStickerSet = MessageObject.getInputStickerSet(document); if (inputStickerSet == null) { return null; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/MessageContainsEmojiButton.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/MessageContainsEmojiButton.java index 4e6b94d20a2..1a4f5e6e4b8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/MessageContainsEmojiButton.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/MessageContainsEmojiButton.java @@ -19,12 +19,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.telegram.messenger.AndroidUtilities; -import org.telegram.messenger.LocaleController; -import org.telegram.messenger.MediaDataController; -import org.telegram.messenger.MessageObject; -import org.telegram.messenger.NotificationCenter; -import org.telegram.messenger.R; +import org.telegram.messenger.*; import org.telegram.tgnet.TLRPC; import org.telegram.ui.ActionBar.Theme; @@ -369,4 +364,4 @@ protected void onAttachedToWindow() { } NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.groupStickersDidLoad); } -} \ No newline at end of file +} diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ReactedUsersListView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ReactedUsersListView.java index bd0d8697147..f7328bcd4e7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ReactedUsersListView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ReactedUsersListView.java @@ -328,6 +328,10 @@ private void updateCustomReactionsButton() { customEmojiStickerSets.clear(); ArrayList sets = new ArrayList<>(); HashSet setIds = new HashSet<>(); + if (MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false)) { + customReactionsEmoji.clear(); + return; + } for (int i = 0; i < customReactionsEmoji.size(); i++) { TLRPC.InputStickerSet stickerSet = MessageObject.getInputStickerSet(AnimatedEmojiDrawable.findDocument(currentAccount, customReactionsEmoji.get(i).documentId)); if (stickerSet != null && !setIds.contains(stickerSet.id)) { @@ -541,4 +545,4 @@ public ReactedUsersListView setOnCustomEmojiSelectedListener(OnCustomEmojiSelect this.onCustomEmojiSelectedListener = onCustomEmojiSelectedListener; return this; } -} \ No newline at end of file +} From 96e0a8bdf03bd25e64d173726413d81990c43cfe Mon Sep 17 00:00:00 2001 From: Nikita S Date: Sat, 4 Feb 2023 21:31:45 +0100 Subject: [PATCH 3/6] hide video stickets in chats --- .../code/telegraher/TelegraherSettingsActivity.java | 12 +++++++++++- .../java/org/telegram/ui/Cells/ChatMessageCell.java | 7 +++++-- TMessagesProj/src/main/res/values-ru/strings.xml | 1 + TMessagesProj/src/main/res/values/strings.xml | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java b/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java index cd6eb73c8c5..481da93cf08 100644 --- a/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java +++ b/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java @@ -111,6 +111,7 @@ public class TelegraherSettingsActivity extends BaseFragment implements Notifica private int chatHideAllInSpoilersRow; private int chatRealForwardedMessageTimeRow; private int chatHideStickersRow; + private int chatHideVideoStickersRow; private int videoLabelRoundBitrateRow; private int videoRoundBitrateMultRow; @@ -203,6 +204,7 @@ public boolean onFragmentCreate() { chatHideAllInSpoilersRow = rowCount++; chatRealForwardedMessageTimeRow = rowCount++; chatHideStickersRow = rowCount++; + chatHideVideoStickersRow = rowCount++; accountLabelRow = rowCount++; accountSessionManagerRow = rowCount++; @@ -399,6 +401,12 @@ public boolean supportsPredictiveItemAnimations() { enabled = preferences.getBoolean("HideStickers", false); editor.putBoolean("HideStickers", !enabled); editor.apply(); + } else if (position == chatHideVideoStickersRow) { + SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); + SharedPreferences.Editor editor = preferences.edit(); + enabled = preferences.getBoolean("HideVideoStickers", false); + editor.putBoolean("HideVideoStickers", !enabled); + editor.apply(); } else if (position == accountExtendVanillaRow) { SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); SharedPreferences.Editor editor = preferences.edit(); @@ -702,6 +710,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatRealForwardedMessageTime), globalPreps.getBoolean("RealForwardedMessageTime", true), true); } else if (position == chatHideStickersRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatHideStickers), globalPreps.getBoolean("HideStickers", false), true); + } else if (position == chatHideVideoStickersRow) { + checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatHideVideoStickers), globalPreps.getBoolean("HideVideoStickers", false), true); } else if (position == gifHDRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THEnableGifHD), globalPreps.getBoolean("EnableGifHD", false), true); } else if (position == videoRoundUseMainCameraRow) { @@ -961,7 +971,7 @@ public int getItemViewType(int position) { || position == hardwareDisableVibroRow || position == chatDeleteMarkRow || position == chatEnableMessageHistoryRow || position == accountExtendVanillaRow || position == chatSBFullRow || position == chatSwapToNextChannelRow || position == chatTabsOnForwardRow || position == chatDisableSpoilersRow || position == chatHideAllInSpoilersRow || position == chatRealForwardedMessageTimeRow - || position == chatHideStickersRow + || position == chatHideStickersRow || position == chatHideVideoStickersRow || position == graheriumSpeedUpUpload || position == graheriumSpeedUpDownload || position == graheriumAnimateEveryAvatar || position == graheriumAnimatedStickerOverlays || position == graheriumVanillaStickerFlow || position == graheriumDisableEmojiStatus || position == graheriumDisablePremiumEmojis || position == gifHDRow || position == videoRoundUseMainCameraRow || position == uiAppHidePhoneNumberOnLeftPanelRow 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 d4bf1dee661..d29a202d65f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -6428,11 +6428,14 @@ private void setMessageContent(MessageObject messageObject, MessageObject.Groupe } } else if ( !MessagesController.getGlobalTelegraherSettings().getBoolean("HideStickers", false) && messageObject.isAnyKindOfSticker() - && - !( + && !( MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false) && messageObject.isAnimatedAnimatedEmoji() ) + && !( + MessagesController.getGlobalTelegraherSettings().getBoolean("HideVideoStickers", false) + && messageObject.isVideoSticker() + ) ) { drawBackground = false; diff --git a/TMessagesProj/src/main/res/values-ru/strings.xml b/TMessagesProj/src/main/res/values-ru/strings.xml index 632576ee63a..ed8d2a83370 100644 --- a/TMessagesProj/src/main/res/values-ru/strings.xml +++ b/TMessagesProj/src/main/res/values-ru/strings.xml @@ -117,4 +117,5 @@ Отправка Игр Использование Инлайн-Ботов Отключить премиум emoji + Скрывать видео стикеры в чатах diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml index ec6ce555c01..2d3c9738105 100644 --- a/TMessagesProj/src/main/res/values/strings.xml +++ b/TMessagesProj/src/main/res/values/strings.xml @@ -6164,4 +6164,5 @@ Send Games Use Inline Bots Disable premium emojis + Hide video stickers in chats From 8f7767c0ba68212cd1345889b4bc88e42707e435 Mon Sep 17 00:00:00 2001 From: Nikita S Date: Sat, 4 Feb 2023 21:36:32 +0100 Subject: [PATCH 4/6] hide animated stickers in chats --- .../code/telegraher/TelegraherSettingsActivity.java | 12 +++++++++++- .../java/org/telegram/ui/Cells/ChatMessageCell.java | 4 ++++ TMessagesProj/src/main/res/values-ru/strings.xml | 1 + TMessagesProj/src/main/res/values/strings.xml | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java b/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java index 481da93cf08..0cf9f4f0f45 100644 --- a/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java +++ b/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java @@ -111,6 +111,7 @@ public class TelegraherSettingsActivity extends BaseFragment implements Notifica private int chatHideAllInSpoilersRow; private int chatRealForwardedMessageTimeRow; private int chatHideStickersRow; + private int chatHideAnimatedStickersRow; private int chatHideVideoStickersRow; private int videoLabelRoundBitrateRow; @@ -204,6 +205,7 @@ public boolean onFragmentCreate() { chatHideAllInSpoilersRow = rowCount++; chatRealForwardedMessageTimeRow = rowCount++; chatHideStickersRow = rowCount++; + chatHideAnimatedStickersRow = rowCount++; chatHideVideoStickersRow = rowCount++; accountLabelRow = rowCount++; @@ -401,6 +403,12 @@ public boolean supportsPredictiveItemAnimations() { enabled = preferences.getBoolean("HideStickers", false); editor.putBoolean("HideStickers", !enabled); editor.apply(); + } else if (position == chatHideAnimatedStickersRow) { + SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); + SharedPreferences.Editor editor = preferences.edit(); + enabled = preferences.getBoolean("HideAnimatedStickers", false); + editor.putBoolean("HideAnimatedStickers", !enabled); + editor.apply(); } else if (position == chatHideVideoStickersRow) { SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); SharedPreferences.Editor editor = preferences.edit(); @@ -710,6 +718,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatRealForwardedMessageTime), globalPreps.getBoolean("RealForwardedMessageTime", true), true); } else if (position == chatHideStickersRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatHideStickers), globalPreps.getBoolean("HideStickers", false), true); + } else if (position == chatHideAnimatedStickersRow) { + checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatHideAnimatedStickers), globalPreps.getBoolean("HideAnimatedStickers", false), true); } else if (position == chatHideVideoStickersRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatHideVideoStickers), globalPreps.getBoolean("HideVideoStickers", false), true); } else if (position == gifHDRow) { @@ -971,7 +981,7 @@ public int getItemViewType(int position) { || position == hardwareDisableVibroRow || position == chatDeleteMarkRow || position == chatEnableMessageHistoryRow || position == accountExtendVanillaRow || position == chatSBFullRow || position == chatSwapToNextChannelRow || position == chatTabsOnForwardRow || position == chatDisableSpoilersRow || position == chatHideAllInSpoilersRow || position == chatRealForwardedMessageTimeRow - || position == chatHideStickersRow || position == chatHideVideoStickersRow + || position == chatHideStickersRow || position == chatHideAnimatedStickersRow || position == chatHideVideoStickersRow || position == graheriumSpeedUpUpload || position == graheriumSpeedUpDownload || position == graheriumAnimateEveryAvatar || position == graheriumAnimatedStickerOverlays || position == graheriumVanillaStickerFlow || position == graheriumDisableEmojiStatus || position == graheriumDisablePremiumEmojis || position == gifHDRow || position == videoRoundUseMainCameraRow || position == uiAppHidePhoneNumberOnLeftPanelRow 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 d29a202d65f..16d538cd3f8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -6436,6 +6436,10 @@ private void setMessageContent(MessageObject messageObject, MessageObject.Groupe MessagesController.getGlobalTelegraherSettings().getBoolean("HideVideoStickers", false) && messageObject.isVideoSticker() ) + && !( + MessagesController.getGlobalTelegraherSettings().getBoolean("HideAnimatedStickers", false) + && messageObject.isAnimatedSticker() + ) ) { drawBackground = false; diff --git a/TMessagesProj/src/main/res/values-ru/strings.xml b/TMessagesProj/src/main/res/values-ru/strings.xml index ed8d2a83370..24f7dcec136 100644 --- a/TMessagesProj/src/main/res/values-ru/strings.xml +++ b/TMessagesProj/src/main/res/values-ru/strings.xml @@ -118,4 +118,5 @@ Использование Инлайн-Ботов Отключить премиум emoji Скрывать видео стикеры в чатах + Скрывать анимированные стикеры в чатах diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml index 2d3c9738105..5be1e509fdd 100644 --- a/TMessagesProj/src/main/res/values/strings.xml +++ b/TMessagesProj/src/main/res/values/strings.xml @@ -6165,4 +6165,5 @@ Use Inline Bots Disable premium emojis Hide video stickers in chats + Hide animated stickers in chats From 6d512f36ef8427f48f162ee603522fbc7d30e24e Mon Sep 17 00:00:00 2001 From: Nikita S Date: Sat, 4 Feb 2023 23:36:14 +0100 Subject: [PATCH 5/6] remove premoji from reactions also --- .../main/java/org/telegram/ui/SelectAnimatedEmojiDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/SelectAnimatedEmojiDialog.java b/TMessagesProj/src/main/java/org/telegram/ui/SelectAnimatedEmojiDialog.java index c538739ff58..dacd031b3eb 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/SelectAnimatedEmojiDialog.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/SelectAnimatedEmojiDialog.java @@ -476,7 +476,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { } boolean showSettings = baseFragment != null && type != TYPE_TOPIC_ICON; - emojiTabs = new EmojiTabsStrip(context, null, false, true, type, showSettings ? () -> { + emojiTabs = new EmojiTabsStrip(context, null, false, !(MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false)), type, showSettings ? () -> { onSettings(); baseFragment.presentFragment(new StickersActivity(MediaDataController.TYPE_EMOJIPACKS, frozenEmojiPacks)); if (dismiss != null) { @@ -2522,6 +2522,7 @@ private void updateRows(boolean updateEmojipacks, boolean diff) { } ArrayList installedEmojipacks = frozenEmojiPacks; ArrayList featuredEmojiPacks = new ArrayList<>(mediaDataController.getFeaturedEmojiSets()); + if ((MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisablePremiumEmojis", false))) featuredEmojiPacks.clear(); ArrayList prevRowHashCodes = new ArrayList<>(rowHashCodes); totalCount = 0; From 5d0b1f5d24ae0b0628be91b2f877fd33af3c0afc Mon Sep 17 00:00:00 2001 From: Nikita S Date: Sat, 4 Feb 2023 23:40:10 +0100 Subject: [PATCH 6/6] Telegraher 9.33.31 * fix from tg 9.4.0 for C-part tgnet * disable premoji small & large * option to hide video stickets in chats * option to hide animated stickers in chats * remove premoji from reactions also --- .github/workflows/Dockerfile_bundle.yml | 6 +++--- README.md | 2 +- README_CHANGES.md | 6 ++++++ gradle.properties | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Dockerfile_bundle.yml b/.github/workflows/Dockerfile_bundle.yml index a03ed5f00ce..e74120c5d28 100644 --- a/.github/workflows/Dockerfile_bundle.yml +++ b/.github/workflows/Dockerfile_bundle.yml @@ -45,7 +45,7 @@ jobs: asset_name: ${{ env.ANAME }}${{ env.AARCH }}.apk asset_content_type: application/gzip env: - RNAME: Telegraher 9.33.30 - TNAME: graher_9.33.30_ - ANAME: Telegraher.9.33.30. + RNAME: Telegraher 9.33.31 + TNAME: graher_9.33.31_ + ANAME: Telegraher.9.33.31. AARCH: bundle diff --git a/README.md b/README.md index d588840ba05..df4a5cdd48d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ different) * Realeases are here: [https://github.com/nikitasius/Telegraher/releases](https://github.com/nikitasius/Telegraher/releases) * if it contain `beta` it mean it's BETA -* Last release `9.33.30`: [bundle](https://github.com/nikitasius/Telegraher/releases/tag/graher_9.33.30_bundle) +* Last release `9.33.31`: [bundle](https://github.com/nikitasius/Telegraher/releases/tag/graher_9.33.31_bundle) * Last beta: write `!beta` in chat ### Issues/Wishlist diff --git a/README_CHANGES.md b/README_CHANGES.md index e0bf42056a3..adecd6ddf46 100644 --- a/README_CHANGES.md +++ b/README_CHANGES.md @@ -1,5 +1,11 @@ # Changes +* 9.33.31 + * fix from tg 9.4.0 for C-part tgnet + * disable premoji small & large + * option to hide video stickets in chats + * option to hide animated stickers in chats + * remove premoji from reactions also * 9.33.30 * catch exception to avoid that function crash in theory in one function call after removing closequetly * disable premium emojis in emoji header list diff --git a/gradle.properties b/gradle.properties index cce81b62ba9..abc528f0250 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true #Sat Mar 12 05:53:50 MSK 2016 -APP_VERSION_NAME=9.33.30 -APP_VERSION_CODE=3026030 +APP_VERSION_NAME=9.33.31 +APP_VERSION_CODE=3026031 APP_PACKAGE=com.evildayz.code.telegraher2 RELEASE_KEY_PASSWORD=android RELEASE_KEY_ALIAS=androidkey