summaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-03-16 22:57:06 +0100
committerByteHamster <info@bytehamster.com>2022-03-20 11:19:04 +0100
commit5cf6051d8817f90072ca631c84b84e71e945a029 (patch)
tree59314aa1af581d4b08bb15ea09a8fd273c060185 /core/src/main
parent60e2c2e113e7313f9d3026d20bf595473a5667c1 (diff)
downloadAntennaPod-5cf6051d8817f90072ca631c84b84e71e945a029.zip
Add button to always refresh over mobile data
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/download/AutoUpdateManager.java8
-rw-r--r--core/src/main/res/values/strings.xml2
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 @@
</plurals>
<string name="edit_tags">Edit tags</string>
<string name="rename_tag_label">Rename tag</string>
- <string name="confirm_mobile_feed_refresh_dialog_message">Downloading episodes over mobile data connection is disabled in the settings.\n\nDo you still want to refresh all podcasts over mobile data?</string>
+ <string name="confirm_mobile_feed_refresh_dialog_message">Refreshing podcasts over mobile data connection is disabled in the settings.\n\nDo you want to refresh anyway?</string>
<!-- actions on feeditems -->
<string name="download_label">Download</string>