feat(settings): move uniform icon to notifications page

This commit is contained in:
FineFindus
2023-05-19 20:23:00 +02:00
parent de4e7c1822
commit a71dc7f481
4 changed files with 10 additions and 7 deletions

View File

@@ -41,10 +41,6 @@ public class AppearanceFragment extends SettingsBaseFragment {
GlobalUserPreferences.save();
needAppRestart = true;
}));
items.add(new SwitchItem(R.string.sk_settings_uniform_icon_for_notifications, R.string.mo_setting_uniform_summary, R.drawable.ic_ntf_logo, GlobalUserPreferences.uniformNotificationIcon, i -> {
GlobalUserPreferences.uniformNotificationIcon = i.checked;
GlobalUserPreferences.save();
}));
items.add(new SwitchItem(R.string.sk_settings_reduce_motion, R.string.mo_setting_reduced_motion_summary, R.drawable.ic_fluent_star_emphasis_24_regular, GlobalUserPreferences.reduceMotion, i -> {
GlobalUserPreferences.reduceMotion = i.checked;
GlobalUserPreferences.save();

View File

@@ -10,6 +10,7 @@ import java.util.ArrayList;
public class NotificationsFragment extends SettingsBaseFragment {
@Override
public void addItems(ArrayList<Item> items) {
items.add(new HeaderItem(R.string.mo_notification_audience_settings));
items.add(notificationPolicyItem = new NotificationPolicyItem());
PushSubscription pushSubscription = getPushSubscription();
boolean switchEnabled = pushSubscription.policy != PushSubscription.Policy.NONE;
@@ -32,7 +33,10 @@ public class NotificationsFragment extends SettingsBaseFragment {
GlobalUserPreferences.keepOnlyLatestNotification=i.checked;
GlobalUserPreferences.save();
}));
items.add(new SwitchItem(R.string.sk_settings_uniform_icon_for_notifications, R.string.mo_setting_uniform_summary, R.drawable.ic_ntf_logo, GlobalUserPreferences.uniformNotificationIcon, i -> {
GlobalUserPreferences.uniformNotificationIcon = i.checked;
GlobalUserPreferences.save();
}));
}
}

View File

@@ -172,8 +172,8 @@ public class SettingsFragment extends MastodonToolbarFragment {
GlobalUserPreferences.useCustomTabs=i.checked;
GlobalUserPreferences.save();
}));
items.add(new SwitchItem(R.string.mo_hide_compose_button_while_scrolling_setting, R.drawable.ic_fluent_edit_24_regular, GlobalUserPreferences.enableFabAutoHide, i->{
GlobalUserPreferences.enableFabAutoHide =i.checked;
items.add(new SwitchItem(R.string.mo_hide_compose_button_while_scrolling_setting, R.drawable.ic_fluent_edit_24_regular, GlobalUserPreferences.autoHideFab, i->{
GlobalUserPreferences.autoHideFab =i.checked;
GlobalUserPreferences.save();
needAppRestart=true;
}));