mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-25 23:20:53 +01:00
Added section to collapse addresses section by default
This commit is contained in:
@@ -64,6 +64,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
private SwitchCompat swAvatars;
|
||||
private SwitchCompat swIdenticons;
|
||||
private SwitchCompat swPreview;
|
||||
private SwitchCompat swAddresses;
|
||||
|
||||
private SwitchCompat swPull;
|
||||
private SwitchCompat swSwipe;
|
||||
@@ -104,6 +105,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||
swPreview = view.findViewById(R.id.swPreview);
|
||||
swAddresses = view.findViewById(R.id.swAddresses);
|
||||
|
||||
swPull = view.findViewById(R.id.swPull);
|
||||
swSwipe = view.findViewById(R.id.swSwipe);
|
||||
@@ -254,6 +256,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
}
|
||||
});
|
||||
|
||||
swAddresses.setChecked(prefs.getBoolean("addresses", true));
|
||||
swAddresses.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("addresses", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swPull.setChecked(prefs.getBoolean("pull", true));
|
||||
swPull.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user