use of de.danoeh.antennapod.fragment.preferences.dialog.PreferenceSwitchDialog in project AntennaPod by AntennaPod.
the class FeedMultiSelectActionHandler method keepUpdatedPrefHandler.
private void keepUpdatedPrefHandler() {
PreferenceSwitchDialog preferenceSwitchDialog = new PreferenceSwitchDialog(activity, activity.getString(R.string.kept_updated), activity.getString(R.string.keep_updated_summary));
preferenceSwitchDialog.setOnPreferenceChangedListener(keepUpdated -> {
saveFeedPreferences(feedPreferences -> {
feedPreferences.setKeepUpdated(keepUpdated);
});
});
preferenceSwitchDialog.openDialog();
}
use of de.danoeh.antennapod.fragment.preferences.dialog.PreferenceSwitchDialog in project AntennaPod by AntennaPod.
the class FeedMultiSelectActionHandler method autoDownloadPrefHandler.
private void autoDownloadPrefHandler() {
PreferenceSwitchDialog preferenceSwitchDialog = new PreferenceSwitchDialog(activity, activity.getString(R.string.auto_download_settings_label), activity.getString(R.string.auto_download_label));
preferenceSwitchDialog.setOnPreferenceChangedListener(new PreferenceSwitchDialog.OnPreferenceChangedListener() {
@Override
public void preferenceChanged(boolean enabled) {
saveFeedPreferences(feedPreferences -> feedPreferences.setAutoDownload(enabled));
}
});
preferenceSwitchDialog.openDialog();
}
Aggregations