Schedule is enabled even when sync is disabled

This commit is contained in:
M66B 2019-05-21 15:31:41 +02:00
parent b0e83d6fa0
commit 2b53398926
1 changed files with 0 additions and 2 deletions

View File

@ -90,7 +90,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
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); spPollInterval.setEnabled(checked);
swSchedule.setEnabled(checked);
ServiceSynchronize.reload(getContext(), true, "enabled=" + checked); ServiceSynchronize.reload(getContext(), true, "enabled=" + checked);
} }
}); });
@ -221,7 +220,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
swEnabled.setChecked(prefs.getBoolean("enabled", true)); swEnabled.setChecked(prefs.getBoolean("enabled", true));
spPollInterval.setEnabled(swEnabled.isChecked()); spPollInterval.setEnabled(swEnabled.isChecked());
swSchedule.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);