Run live updates right after Live updates enable for item.

This commit is contained in:
GaidamakUA 2015-12-25 18:24:05 +02:00
parent b40e45b627
commit 39c3ef08b3

View file

@ -125,7 +125,12 @@ public class LiveUpdatesSettingsDialogFragment extends DialogFragment {
.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
liveUpdatePreference.set(liveUpdatesSwitch.isChecked()); if (liveUpdatePreference.get() != liveUpdatesSwitch.isChecked()) {
liveUpdatePreference.set(liveUpdatesSwitch.isChecked());
if (liveUpdatesSwitch.isChecked()) {
runLiveUpdate(localIndexInfo);
}
}
downloadViaWiFiPreference.set(downloadOverWiFiCheckBox.isChecked()); downloadViaWiFiPreference.set(downloadOverWiFiCheckBox.isChecked());
final int updateFrequencyInt = updateFrequencySpinner.getSelectedItemPosition(); final int updateFrequencyInt = updateFrequencySpinner.getSelectedItemPosition();