Download manager in Kotlin and fix another crash in reader

This commit is contained in:
len
2016-03-19 00:11:34 +01:00
parent 35748fc1f3
commit aaef738dda
11 changed files with 656 additions and 690 deletions
@@ -68,14 +68,14 @@ class DownloadPresenter : BasePresenter<DownloadFragment>() {
override fun onTakeView(view: DownloadFragment) {
super.onTakeView(view)
statusSubscription = downloadQueue.statusObservable
.startWith(downloadQueue.activeDownloads)
statusSubscription = downloadQueue.getStatusObservable()
.startWith(downloadQueue.getActiveDownloads())
.observeOn(AndroidSchedulers.mainThread())
.subscribe { processStatus(it, view) }
add(statusSubscription)
pageProgressSubscription = downloadQueue.progressObservable
pageProgressSubscription = downloadQueue.getProgressObservable()
.onBackpressureBuffer()
.observeOn(AndroidSchedulers.mainThread())
.subscribe { view.onUpdateDownloadedPages(it) }