Add hide send as channel

This commit is contained in:
luvletter2333 2021-12-23 22:58:13 +08:00
parent bb2acb6a29
commit cde8d42dc7
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
4 changed files with 5 additions and 0 deletions

View File

@ -7581,6 +7581,8 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
if (parentFragment == null) {
return;
}
if (NekomuraConfig.hideSendAsChannel.Bool())
return;
TLRPC.ChatFull full = parentFragment.getMessagesController().getChatFull(-dialog_id);
TLRPC.Peer defPeer = full != null ? full.default_send_as : null;
if (defPeer == null && delegate.getSendAsPeers() != null && !delegate.getSendAsPeers().peers.isEmpty()) {

View File

@ -103,6 +103,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
}));
private final AbstractCell repeatConfirmRow = cellGroup.appendCell(new NekomuraTGTextCheck(NekomuraConfig.repeatConfirm));
private final AbstractCell rememberAllBackMessagesRow = cellGroup.appendCell(new NekomuraTGTextCheck(NekomuraConfig.rememberAllBackMessages));
private final AbstractCell hideSendAsChannelRow = cellGroup.appendCell(new NekomuraTGTextCheck(NekomuraConfig.hideSendAsChannel));
private final AbstractCell divider1 = cellGroup.appendCell(new NekomuraTGDivider());
private final AbstractCell header2 = cellGroup.appendCell(new NekomuraTGHeader(LocaleController.getString("AutoDownload")));
private final AbstractCell win32Row = cellGroup.appendCell(new NekomuraTGTextCheck(NekomuraConfig.disableAutoDownloadingWin32Executable));

View File

@ -171,6 +171,7 @@ public class NekomuraConfig {
public static ConfigItem hideGroupSticker = addConfig("hideGroupSticker", configTypeBool, false);
public static ConfigItem hideSponsoredMessage = addConfig("hideSponsoredMessage", configTypeBool, false);
public static ConfigItem rememberAllBackMessages = addConfig("rememberAllBackMessages", configTypeBool, false);
public static ConfigItem hideSendAsChannel = addConfig("hideSendAsChannel", configTypeBool, false);
public static ConfigItem disableAutoDownloadingWin32Executable = addConfig("Win32ExecutableFiles", configTypeBool, true);
public static ConfigItem disableAutoDownloadingArchive = addConfig("ArchiveFiles", configTypeBool, true);

View File

@ -124,5 +124,6 @@
<string name="disableRemoteEmojiInteractions">Disable emoji interactions from remote</string>
<string name="enablePublicProxy">NekoX Public Proxy</string>
<string name="autoUpdateSubInfo">Update proxies automatically</string>
<string name="hideSendAsChannel">Hide send as channel</string>
</resources>