mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-25 23:20:53 +01:00
Added setting to enable/disable conversation threading
This commit is contained in:
@@ -43,9 +43,10 @@ import androidx.appcompat.widget.SwitchCompat;
|
||||
public class FragmentOptions extends FragmentEx implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private SwitchCompat swEnabled;
|
||||
private SwitchCompat swMetered;
|
||||
private SwitchCompat swThreading;
|
||||
private SwitchCompat swCompact;
|
||||
private SwitchCompat swAvatars;
|
||||
private SwitchCompat swIdenticons;
|
||||
private SwitchCompat swCompact;
|
||||
private SwitchCompat swPreview;
|
||||
private SwitchCompat swLight;
|
||||
private SwitchCompat swBrowse;
|
||||
@@ -69,6 +70,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
// Get controls
|
||||
swEnabled = view.findViewById(R.id.swEnabled);
|
||||
swMetered = view.findViewById(R.id.swMetered);
|
||||
swThreading = view.findViewById(R.id.swThreading);
|
||||
swCompact = view.findViewById(R.id.swCompact);
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||
@@ -107,6 +109,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
}
|
||||
});
|
||||
|
||||
swThreading.setChecked(prefs.getBoolean("threading", true));
|
||||
swThreading.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("threading", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swCompact.setChecked(prefs.getBoolean("compact", false));
|
||||
swCompact.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user