Skip to content

Commit

Permalink
feat: Disable Channel Mute Button
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Apr 13, 2024
1 parent 7d17e3c commit 2699bf2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -24904,6 +24904,11 @@ private void updateBottomOverlay() {
bottomOverlayChatText.setText(LocaleController.getString("ChannelUnmute", R.string.ChannelUnmute), true);
bottomOverlayChatText.setEnabled(true);
}
// na: DisableChannelMuteButton
if (NaConfig.INSTANCE.getDisableChannelMuteButton().Bool()) {
bottomOverlayChatText.setText("", false);
bottomOverlayChatText.setEnabled(false);
}
showBottomOverlayProgress(false, bottomOverlayProgress.getTag() != null);
} else if (forumTopic != null && forumTopic.closed) {
if (!ChatObject.canManageTopic(currentAccount, currentChat, forumTopic)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public class NekoChatSettingsActivity extends BaseNekoXSettingsActivity implemen
private final AbstractConfigCell disableProximityEventsRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableProximityEvents));
private final AbstractConfigCell disableTrendingRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableTrending));
private final AbstractConfigCell disableSwipeToNextRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableSwipeToNext));
private final AbstractConfigCell disableChannelMuteButtonRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableChannelMuteButton()));
private final AbstractConfigCell disablePhotoSideActionRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disablePhotoSideAction));
private final AbstractConfigCell disableClickProfileGalleryViewRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableClickProfileGalleryView()));
private final AbstractConfigCell disableRemoteEmojiInteractionsRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableRemoteEmojiInteractions));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val disableChannelMuteButton =
addConfig(
"DisableChannelMuteButton",
ConfigItem.configTypeBool,
false
)

private fun addConfig(
k: String,
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@
<string name="SendMp4DocumentAsVideo">MP4 视频作为文件发送时可预览</string>
<string name="StickersChooseShortNameForStickerPack">为您的包选择一个简短的名称。</string>
<string name="StickersCopyStickerSet">复制整个贴纸包</string>
<string name="DisableChannelMuteButton">禁用频道聊天页面的静音按钮</string>
</resources>
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@
<string name="SendMp4DocumentAsVideo">Send mp4 document as video</string>
<string name="StickersChooseShortNameForStickerPack">Choose a short name for your pack.</string>
<string name="StickersCopyStickerSet">Copy Sticker Set</string>
<string name="DisableChannelMuteButton">Disable channel mute button</string>
</resources>

0 comments on commit 2699bf2

Please sign in to comment.