summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorMartin Fietz <martin.fietz@gmail.com>2018-01-10 22:02:59 +0100
committerMartin Fietz <martin.fietz@gmail.com>2018-01-10 22:02:59 +0100
commit0238d24216fe82060be58a99fd7d0d7c17c0c7f1 (patch)
treec6b89d55a4a42195d13db24c80895c9520ffcbb8 /app/src/main
parent21ac9d158f4d81b082b8cb1d6f65146ed5c4c4ca (diff)
downloadAntennaPod-0238d24216fe82060be58a99fd7d0d7c17c0c7f1.zip
Replace deprecated method
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java
index defceb09b..0aa135478 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java
@@ -270,16 +270,11 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
feed.getDownload_url(), "OnlineFeed", 0, Feed.FEEDFILETYPE_FEED, username, password,
true, null);
- download = Observable.create(new Observable.OnSubscribe<DownloadStatus>() {
- @Override
- public void call(Subscriber<? super DownloadStatus> subscriber) {
+ download = Observable.fromCallable(() -> {
feeds = DBReader.getFeedList();
downloader = new HttpDownloader(request);
downloader.call();
- Log.d(TAG, "Download was completed");
- subscriber.onNext(downloader.getResult());
- subscriber.onCompleted();
- }
+ return downloader.getResult();
})
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())