From 0238d24216fe82060be58a99fd7d0d7c17c0c7f1 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Wed, 10 Jan 2018 22:02:59 +0100 Subject: [PATCH] Replace deprecated method --- .../antennapod/activity/OnlineFeedViewActivity.java | 9 ++------- 1 file 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() { - @Override - public void call(Subscriber 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())