diff options
author | peakvalleytech <65185819+peakvalleytech@users.noreply.github.com> | 2021-03-06 11:44:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-06 20:44:15 +0100 |
commit | f90656d213f9c42d0def0abcd4dbb2d6f9c50d21 (patch) | |
tree | ddb829a0e32b47c1e270c9bd3d2caad1301c334c /app/src | |
parent | 1828dd162214817a7d9ed586b8d9c71705a22659 (diff) | |
download | AntennaPod-f90656d213f9c42d0def0abcd4dbb2d6f9c50d21.zip |
Show podcast-specific settings in preferences search (#4990)
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java | 16 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java index 6e526911b..95ba842e1 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java @@ -2,6 +2,7 @@ package de.danoeh.antennapod.activity; import android.os.Bundle; import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.preference.PreferenceFragmentCompat; import android.view.Menu; @@ -95,6 +96,8 @@ public class PreferenceActivity extends AppCompatActivity implements SearchPrefe return R.string.gpodnet_main_label; case R.xml.preferences_notifications: return R.string.notification_pref_fragment; + case R.xml.feed_settings: + return R.string.feed_settings_label; default: return R.string.settings_label; } @@ -128,7 +131,16 @@ public class PreferenceActivity extends AppCompatActivity implements SearchPrefe @Override public void onSearchResultClicked(SearchPreferenceResult result) { - PreferenceFragmentCompat fragment = openScreen(result.getResourceFile()); - result.highlight(fragment); + int screen = result.getResourceFile(); + if (screen == R.xml.feed_settings) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(R.string.feed_settings_label); + builder.setMessage(R.string.pref_feed_settings_dialog_msg); + builder.setPositiveButton(android.R.string.ok, null); + builder.show(); + } else { + PreferenceFragmentCompat fragment = openScreen(result.getResourceFile()); + result.highlight(fragment); + } } } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java index 7bf602e35..c7e579a5a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java @@ -145,5 +145,7 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat { .addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_gpodder)); config.index(R.xml.preferences_notifications) .addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_notifications)); + config.index(R.xml.feed_settings) + .addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.feed_settings)); } } |