mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 15:40:59 +01:00
Added option to disable pull down to refresh
This commit is contained in:
@@ -68,6 +68,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
private SwitchCompat swLight;
|
||||
private Button btnSound;
|
||||
|
||||
private SwitchCompat swPull;
|
||||
private SwitchCompat swSwipe;
|
||||
private SwitchCompat swActionbar;
|
||||
private SwitchCompat swAutoClose;
|
||||
@@ -106,6 +107,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
swLight = view.findViewById(R.id.swLight);
|
||||
btnSound = view.findViewById(R.id.btnSound);
|
||||
|
||||
swPull = view.findViewById(R.id.swPull);
|
||||
swSwipe = view.findViewById(R.id.swSwipe);
|
||||
swActionbar = view.findViewById(R.id.swActionbar);
|
||||
swAutoClose = view.findViewById(R.id.swAutoClose);
|
||||
@@ -272,6 +274,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
|
||||
}
|
||||
});
|
||||
|
||||
swPull.setChecked(prefs.getBoolean("pull", true));
|
||||
swPull.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("pull", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swSwipe.setChecked(prefs.getBoolean("swipe", true));
|
||||
swSwipe.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user