Replace deprecated method
This commit is contained in:
parent
21ac9d158f
commit
0238d24216
|
@ -270,16 +270,11 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
||||||
feed.getDownload_url(), "OnlineFeed", 0, Feed.FEEDFILETYPE_FEED, username, password,
|
feed.getDownload_url(), "OnlineFeed", 0, Feed.FEEDFILETYPE_FEED, username, password,
|
||||||
true, null);
|
true, null);
|
||||||
|
|
||||||
download = Observable.create(new Observable.OnSubscribe<DownloadStatus>() {
|
download = Observable.fromCallable(() -> {
|
||||||
@Override
|
|
||||||
public void call(Subscriber<? super DownloadStatus> subscriber) {
|
|
||||||
feeds = DBReader.getFeedList();
|
feeds = DBReader.getFeedList();
|
||||||
downloader = new HttpDownloader(request);
|
downloader = new HttpDownloader(request);
|
||||||
downloader.call();
|
downloader.call();
|
||||||
Log.d(TAG, "Download was completed");
|
return downloader.getResult();
|
||||||
subscriber.onNext(downloader.getResult());
|
|
||||||
subscriber.onCompleted();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.subscribeOn(Schedulers.newThread())
|
.subscribeOn(Schedulers.newThread())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
|
Loading…
Reference in New Issue