summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
index 0be96d398..f7c338729 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
@@ -477,13 +477,13 @@ public class DownloadService extends Service {
&& isEnqueued(request, itemsEnqueued)) {
request.setMediaEnqueued(true);
}
- downloads.add(downloader);
- downloadExecutor.submit(downloader);
-
- postDownloaders();
+ handler.post(() -> {
+ downloads.add(downloader);
+ downloadExecutor.submit(downloader);
+ postDownloaders();
+ });
}
-
- queryDownloads();
+ handler.post(this::queryDownloads);
}
private static boolean isEnqueued(@NonNull DownloadRequest request,