feat: Hide Premium Only Channel
This commit is contained in:
parent
94f9137a6f
commit
cec3bdcf15
@ -17867,6 +17867,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
sendAsPeersObj = getMessagesController().getSendAsPeers(dialog_id);
|
||||
if (sendAsPeersObj != null) {
|
||||
if (NaConfig.INSTANCE.getHidePremiumOnlyChannel().Bool()) {
|
||||
sendAsPeersObj.peers.removeIf(peer -> peer.premium_required);
|
||||
}
|
||||
chatActivityEnterView.updateSendAsButton(animatedUpdate);
|
||||
}
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
||||
private final AbstractConfigCell showBottomActionsWhenSelectingRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.showBottomActionsWhenSelecting));
|
||||
private final AbstractConfigCell labelChannelUserRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.labelChannelUser));
|
||||
private final AbstractConfigCell hideSendAsChannelRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.hideSendAsChannel));
|
||||
private final AbstractConfigCell hidePremiumOnlyChannelRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getHidePremiumOnlyChannel()));
|
||||
private final AbstractConfigCell showSpoilersDirectlyRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.showSpoilersDirectly));
|
||||
private final AbstractConfigCell messageMenuRow = cellGroup.appendCell(new ConfigCellSelectBox(LocaleController.getString("MessageMenu"), null, null, this::showMessageMenuAlert));
|
||||
private final AbstractConfigCell customGreatRow = cellGroup.appendCell(new ConfigCellTextInput(null, NaConfig.INSTANCE.getCustomGreat(), LocaleController.getString(R.string.CustomGreatHint), null,(input) -> input.isEmpty() ? (String) NaConfig.INSTANCE.getCustomGreat().defaultValue : input));
|
||||
|
@ -322,6 +322,12 @@ object NaConfig {
|
||||
ConfigItem.configTypeString,
|
||||
""
|
||||
)
|
||||
val hidePremiumOnlyChannel =
|
||||
addConfig(
|
||||
"HidePremiumOnlyChannel",
|
||||
ConfigItem.configTypeBool,
|
||||
false
|
||||
)
|
||||
|
||||
private fun addConfig(
|
||||
k: String,
|
||||
|
@ -66,4 +66,5 @@
|
||||
<string name="CustomPoor">自定义长按快捷回复词</string>
|
||||
<string name="CustomPoorHint">默认破烂</string>
|
||||
<string name="CustomEditedMessage">自定义已编辑消息提示词</string>
|
||||
<string name="HidePremiumOnlyChannel">隐藏大会员皮套</string>
|
||||
</resources>
|
||||
|
@ -67,4 +67,5 @@
|
||||
<string name="CustomPoor">Custom long click reply word</string>
|
||||
<string name="CustomPoorHint">Default pool</string>
|
||||
<string name="CustomEditedMessage">Custom Edited Message word</string>
|
||||
<string name="HidePremiumOnlyChannel">Hide Premium Only Channel</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user