Skip to content

Commit

Permalink
feat: hide mute all in filter
Browse files Browse the repository at this point in the history
Co-authored-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
  • Loading branch information
omg-xtao and NextAlone committed Sep 24, 2023
1 parent c739470 commit 92a8e8f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3492,7 +3492,7 @@ public boolean didSelectTab(FilterTabsView.TabView tabView, boolean selected) {
.add(R.drawable.msg_edit, defaultTab ? LocaleController.getString("FilterEditAll", R.string.FilterEditAll) : LocaleController.getString("FilterEdit", R.string.FilterEdit), () -> {
presentFragment(defaultTab ? new FiltersSetupActivity() : new FilterCreateActivity(dialogFilter));
})
.addIf(dialogFilter != null && !dialogs.isEmpty(), muteAll ? R.drawable.msg_mute : R.drawable.msg_unmute, muteAll ? LocaleController.getString("FilterMuteAll", R.string.FilterMuteAll) : LocaleController.getString("FilterUnmuteAll", R.string.FilterUnmuteAll), () -> {
.addIf(!NaConfig.INSTANCE.getHideFilterMuteAll().Bool() && dialogFilter != null && !dialogs.isEmpty(), muteAll ? R.drawable.msg_mute : R.drawable.msg_unmute, muteAll ? LocaleController.getString("FilterMuteAll", R.string.FilterMuteAll) : LocaleController.getString("FilterUnmuteAll", R.string.FilterUnmuteAll), () -> {
int count = 0;
for (int i = 0; i < dialogs.size(); ++i) {
TLRPC.Dialog dialog = dialogs.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public class NekoGeneralSettingsActivity extends BaseNekoXSettingsActivity {
LocaleController.getString("TabTitleTypeIcon", R.string.TabTitleTypeIcon),
LocaleController.getString("TabTitleTypeMix", R.string.TabTitleTypeMix)
}, null));
private final AbstractConfigCell hideFilterMuteAllRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getHideFilterMuteAll()));
private final AbstractConfigCell dividerFolder = cellGroup.appendCell(new ConfigCellDivider());

private final AbstractConfigCell header_notification = cellGroup.appendCell(new ConfigCellHeader(LocaleController.getString("NekoGeneralNotification")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val hideFilterMuteAll =
addConfig(
"HideFilterMuteAll",
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 @@ -88,4 +88,5 @@
<string name="DisableSuggestionView">禁用修改手机号码的建议</string>
<string name="DisableStories">禁用动态功能</string>
<string name="DisableSendReadStories">偷偷看动态</string>
<string name="HideFilterMuteAll">隐藏文件夹中的\"全部取消静音\"</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 @@ -91,4 +91,5 @@
<string name="DisableSuggestionView">Disable Profile Settings Suggestion</string>
<string name="DisableStories">Disable Stories</string>
<string name="DisableSendReadStories">Disable Send Read Stories</string>
<string name="HideFilterMuteAll">Hide filter mute all</string>
</resources>

0 comments on commit 92a8e8f

Please sign in to comment.