Small behavior improvement

This commit is contained in:
M66B 2019-08-06 09:55:20 +02:00
parent eb405aaded
commit 361e9f68b3
1 changed files with 0 additions and 2 deletions

View File

@ -99,7 +99,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("enabled", checked).apply(); prefs.edit().putBoolean("enabled", checked).apply();
spPollInterval.setEnabled(checked);
if (!checked) if (!checked)
swSchedule.setChecked(false); swSchedule.setChecked(false);
ServiceSynchronize.reload(getContext(), true, "enabled=" + checked); ServiceSynchronize.reload(getContext(), true, "enabled=" + checked);
@ -255,7 +254,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
swEnabled.setChecked(prefs.getBoolean("enabled", true)); swEnabled.setChecked(prefs.getBoolean("enabled", true));
spPollInterval.setEnabled(swEnabled.isChecked());
int pollInterval = prefs.getInt("poll_interval", 0); int pollInterval = prefs.getInt("poll_interval", 0);
int[] pollIntervalValues = getResources().getIntArray(R.array.pollIntervalValues); int[] pollIntervalValues = getResources().getIntArray(R.array.pollIntervalValues);