Disable auto optimize on always sync

This commit is contained in:
M66B
2023-01-05 10:48:08 +01:00
parent e1b36c6f9c
commit f9957d5294
2 changed files with 6 additions and 1 deletions

View File

@@ -600,7 +600,10 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS
cbAlways.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton v, boolean isChecked) {
prefs.edit().putInt("poll_interval", isChecked ? 0 : EntityAccount.DEFAULT_POLL_INTERVAL).apply();
int value = (isChecked ? 0 : EntityAccount.DEFAULT_POLL_INTERVAL);
prefs.edit().putInt("poll_interval", value).apply();
if (value == 0)
prefs.edit().remove("auto_optimize").apply();
}
});