Small behavior improvement

pull/160/head
M66B 5 years ago
parent eb405aaded
commit 361e9f68b3

@ -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);

Loading…
Cancel
Save