summaryrefslogtreecommitdiff
path: root/core/src/main/java/de/danoeh
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2018-05-26 23:20:47 +0200
committerByteHamster <info@bytehamster.com>2018-05-26 23:20:47 +0200
commit9ce48bd86bc5f32f197f2f5b0d3a78596b9c15fe (patch)
tree18d6c49226bfd64a506cf31e1b939f9bd3edad8e /core/src/main/java/de/danoeh
parentaa25ab5ff4a99deff19be05b04eaedbcb7d851ad (diff)
downloadAntennaPod-9ce48bd86bc5f32f197f2f5b0d3a78596b9c15fe.zip
Added a refreshAllFeeds method without callback
Diffstat (limited to 'core/src/main/java/de/danoeh')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java
index 22a7b64fe..da500fd3e 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java
@@ -157,6 +157,17 @@ public final class DBTasks {
*
* @param context Might be used for accessing the database
* @param feeds List of Feeds that should be refreshed.
+ */
+ public static void refreshAllFeeds(final Context context, final List<Feed> feeds) {
+ refreshAllFeeds(context, feeds, null);
+ }
+
+ /**
+ * Refreshes a given list of Feeds in a separate Thread. This method might ignore subsequent calls if it is still
+ * enqueuing Feeds for download from a previous call
+ *
+ * @param context Might be used for accessing the database
+ * @param feeds List of Feeds that should be refreshed.
* @param callback Called after everything was added enqueued for download. Might be null.
*/
public static void refreshAllFeeds(final Context context, final List<Feed> feeds, @Nullable Runnable callback) {
@@ -348,7 +359,7 @@ public final class DBTasks {
Log.d(TAG, "last refresh: " + Converter.getDurationStringLocalized(context,
System.currentTimeMillis() - lastRefresh) + " ago");
if(lastRefresh <= System.currentTimeMillis() - interval) {
- DBTasks.refreshAllFeeds(context, null, null);
+ DBTasks.refreshAllFeeds(context, null);
}
}