diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 6d50344f9..2073541a6 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -24675,6 +24675,10 @@ private void updateBottomOverlay() { bottomOverlayChatText.setText(LocaleController.getString("ChannelUnmute", R.string.ChannelUnmute), true); bottomOverlayChatText.setEnabled(true); } + if (Config.disableChannelMuteButton) { + bottomOverlayChatText.setText("", false); + bottomOverlayChatText.setEnabled(false); + } showBottomOverlayProgress(false, bottomOverlayProgress.getTag() != null); } else if (forumTopic != null && forumTopic.closed) { if (!ChatObject.canManageTopic(currentAccount, currentChat, forumTopic)) { diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/ChatSettingActivity.java b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/ChatSettingActivity.java index 49c00d814..e637438f1 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/ChatSettingActivity.java +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/ChatSettingActivity.java @@ -139,6 +139,7 @@ public class ChatSettingActivity extends BaseActivity { private int filterZalgoRow; private int hideKeyboardWhenScrollingRow; private int searchInPlaceRow; + private int disableChannelMuteButtonRow; private int chat2Row; private int markdownRow; @@ -448,6 +449,11 @@ protected void onItemClick(View view, int position, float x, float y) { if (view instanceof TextCheckCell) { ((TextCheckCell) view).setChecked(Config.searchInPlace); } + } else if (position == disableChannelMuteButtonRow) { + Config.toggleDisableChannelMuteButton(); + if (view instanceof TextCheckCell) { + ((TextCheckCell) view).setChecked(Config.disableChannelMuteButton); + } } } @@ -513,6 +519,7 @@ protected void updateRows() { filterZalgoRow = addRow("filterZalgo"); hideKeyboardWhenScrollingRow = addRow("hideKeyboardWhenScrolling"); searchInPlaceRow = addRow("searchInPlace"); + disableChannelMuteButtonRow = addRow("disableChannelMuteButton"); chat2Row = addRow(); markdownRow = addRow(); markdownDisableRow = addRow("markdownDisabled"); @@ -685,6 +692,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, boole textCell.setTextAndCheck(LocaleController.getString("hideKeyboardWhenScrolling", R.string.hideKeyboardWhenScrolling), Config.hideKeyboardWhenScrolling, true); } else if (position == searchInPlaceRow) { textCell.setTextAndCheck(LocaleController.getString("searchInPlace", R.string.searchInPlace), Config.searchInPlace, true); + } else if (position == disableChannelMuteButtonRow) { + textCell.setTextAndCheck(LocaleController.getString("disableChannelMuteButton", R.string.disableChannelMuteButton), Config.disableChannelMuteButton, true); } break; } diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/Defines.kt b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/Defines.kt index 686dd688a..71cb03e60 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/Defines.kt +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/Defines.kt @@ -216,6 +216,7 @@ object Defines { @BooleanConfig const val searchInPlace = "searchInPlace" @IntConfig(100) const val gifSize = "gifSize" @BooleanConfig const val hideDialogsFloatingButton = "hideDialogsFloatingButton" + @BooleanConfig const val disableChannelMuteButton = "disableChannelMuteButton" // Drawer List @BooleanConfig(true) const val showNewGroup = "showNewGroup" diff --git a/TMessagesProj/src/main/res/values-zh/strings_nullgram.xml b/TMessagesProj/src/main/res/values-zh/strings_nullgram.xml index 98c0cd1a0..5434e2452 100644 --- a/TMessagesProj/src/main/res/values-zh/strings_nullgram.xml +++ b/TMessagesProj/src/main/res/values-zh/strings_nullgram.xml @@ -372,6 +372,7 @@ GIF 大小 屏蔽 禁用主页浮动按钮 + 禁用频道静音按钮 引用 引用到... diff --git a/TMessagesProj/src/main/res/values/strings_nullgram.xml b/TMessagesProj/src/main/res/values/strings_nullgram.xml index b176d9591..ec95a8532 100644 --- a/TMessagesProj/src/main/res/values/strings_nullgram.xml +++ b/TMessagesProj/src/main/res/values/strings_nullgram.xml @@ -376,4 +376,5 @@ GIF size Block Hide dialogs floating button + Disable channel mute button