mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 07:32:08 +01:00
Added identicons
This commit is contained in:
@@ -34,6 +34,7 @@ import androidx.appcompat.widget.SwitchCompat;
|
||||
public class FragmentOptions extends FragmentEx {
|
||||
private SwitchCompat swEnabled;
|
||||
private SwitchCompat swAvatars;
|
||||
private SwitchCompat swIdenticons;
|
||||
private SwitchCompat swLight;
|
||||
private SwitchCompat swBrowse;
|
||||
private SwitchCompat swSwipe;
|
||||
@@ -52,6 +53,7 @@ public class FragmentOptions extends FragmentEx {
|
||||
// Get controls
|
||||
swEnabled = view.findViewById(R.id.swEnabled);
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||
swLight = view.findViewById(R.id.swLight);
|
||||
swBrowse = view.findViewById(R.id.swBrowse);
|
||||
swSwipe = view.findViewById(R.id.swSwipe);
|
||||
@@ -84,6 +86,14 @@ public class FragmentOptions extends FragmentEx {
|
||||
}
|
||||
});
|
||||
|
||||
swIdenticons.setChecked(prefs.getBoolean("identicons", true));
|
||||
swIdenticons.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("identicons", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swLight.setChecked(prefs.getBoolean("light", false));
|
||||
swLight.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user