mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Always group notifications
This commit is contained in:
@@ -49,7 +49,6 @@ import androidx.preference.PreferenceManager;
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
public class FragmentOptionsNotifications extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private SwitchCompat swNotifyGroup;
|
||||
private SwitchCompat swNotifyPreview;
|
||||
private CheckBox cbNotifyActionTrash;
|
||||
private CheckBox cbNotifyActionArchive;
|
||||
@@ -64,7 +63,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
||||
private Group grpNotification;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"notify_group", "notify_preview", "notify_trash", "notify_archive", "notify_reply", "notify_flag", "notify_seen", "light", "sound"
|
||||
"notify_preview", "notify_trash", "notify_archive", "notify_reply", "notify_flag", "notify_seen", "light", "sound"
|
||||
};
|
||||
|
||||
@Override
|
||||
@@ -77,7 +76,6 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
||||
|
||||
// Get controls
|
||||
|
||||
swNotifyGroup = view.findViewById(R.id.swNotifyGroup);
|
||||
swNotifyPreview = view.findViewById(R.id.swNotifyPreview);
|
||||
cbNotifyActionTrash = view.findViewById(R.id.cbNotifyActionTrash);
|
||||
cbNotifyActionArchive = view.findViewById(R.id.cbNotifyActionArchive);
|
||||
@@ -98,13 +96,6 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
||||
PackageManager pm = getContext().getPackageManager();
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
swNotifyGroup.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("notify_group", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swNotifyPreview.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -233,8 +224,6 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
||||
boolean pro = Helper.isPro(getContext());
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
swNotifyGroup.setChecked(prefs.getBoolean("notify_group", true));
|
||||
swNotifyGroup.setVisibility(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? View.VISIBLE : View.GONE);
|
||||
swNotifyPreview.setChecked(prefs.getBoolean("notify_preview", true));
|
||||
|
||||
cbNotifyActionTrash.setChecked(prefs.getBoolean("notify_trash", true));
|
||||
|
||||
Reference in New Issue
Block a user