From 5cf6051d8817f90072ca631c84b84e71e945a029 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 16 Mar 2022 22:57:06 +0100 Subject: [PATCH] Add button to always refresh over mobile data --- .../antennapod/core/util/download/AutoUpdateManager.java | 8 ++++++-- core/src/main/res/values/strings.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/download/AutoUpdateManager.java b/core/src/main/java/de/danoeh/antennapod/core/util/download/AutoUpdateManager.java index dbad1f63e..674082a13 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/download/AutoUpdateManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/download/AutoUpdateManager.java @@ -123,7 +123,7 @@ public class AutoUpdateManager { Log.d(TAG, "Run auto update immediately in background."); if (!NetworkUtils.networkAvailable()) { Log.d(TAG, "Ignoring: No network connection."); - } else if (NetworkUtils.isEpisodeDownloadAllowed()) { + } else if (NetworkUtils.isFeedRefreshAllowed()) { startRefreshAllFeeds(context); } else { confirmMobileAllFeedsRefresh(context); @@ -134,8 +134,12 @@ public class AutoUpdateManager { AlertDialog.Builder builder = new AlertDialog.Builder(context) .setTitle(R.string.feed_refresh_title) .setMessage(R.string.confirm_mobile_feed_refresh_dialog_message) - .setPositiveButton(R.string.yes, + .setPositiveButton(R.string.confirm_mobile_streaming_button_once, (dialog, which) -> startRefreshAllFeeds(context)) + .setNeutralButton(R.string.confirm_mobile_streaming_button_always, (dialog, which) -> { + UserPreferences.setAllowMobileFeedRefresh(true); + startRefreshAllFeeds(context); + }) .setNegativeButton(R.string.no, null); builder.show(); } diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 1196c0eee..d9ed1262b 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -188,7 +188,7 @@ Edit tags Rename tag - Downloading episodes over mobile data connection is disabled in the settings.\n\nDo you still want to refresh all podcasts over mobile data? + Refreshing podcasts over mobile data connection is disabled in the settings.\n\nDo you want to refresh anyway? Download