mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 07:32:08 +01:00
Added setting to enable/disabled unified inbox
This commit is contained in:
@@ -43,6 +43,7 @@ import androidx.appcompat.widget.SwitchCompat;
|
||||
public class FragmentOptions extends FragmentEx implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private SwitchCompat swEnabled;
|
||||
private SwitchCompat swMetered;
|
||||
private SwitchCompat swUnified;
|
||||
private SwitchCompat swThreading;
|
||||
private SwitchCompat swCompact;
|
||||
private SwitchCompat swAvatars;
|
||||
@@ -70,6 +71,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
// Get controls
|
||||
swEnabled = view.findViewById(R.id.swEnabled);
|
||||
swMetered = view.findViewById(R.id.swMetered);
|
||||
swUnified = view.findViewById(R.id.swUnified);
|
||||
swThreading = view.findViewById(R.id.swThreading);
|
||||
swCompact = view.findViewById(R.id.swCompact);
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
@@ -109,6 +111,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
}
|
||||
});
|
||||
|
||||
swUnified.setChecked(prefs.getBoolean("unified", true));
|
||||
swUnified.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("unified", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swThreading.setChecked(prefs.getBoolean("threading", true));
|
||||
swThreading.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user