From 81ebeb43b3f5559abd8d0a46bf68ca80003c7b97 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sat, 22 Nov 2014 00:57:52 -0500 Subject: [PATCH] More slight edits --- .../minimalbible/activity/downloader/manager/BookManager.kt | 4 ++-- .../minimalbible/activity/downloader/manager/LocaleManager.kt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt index a970e1e..6a31f69 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt @@ -63,8 +63,8 @@ class BookManager(private val installedBooks: Books, val rM: RefreshManager) : fun downloadBook(b: Book) { // First, look up where the Book came from Observable.just(rM installerFromBook b) - .subscribeOn(Schedulers.io()) - .subscribe { it.toBlocking().first() install b } + .observeOn(Schedulers.io()) + .subscribe { it subscribe { it install b } } downloadEvents onNext DLProgressEvent(DLProgressEvent.PROGRESS_BEGINNING, b) } diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt index f7e0cdc..dd51bfd 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt @@ -36,6 +36,7 @@ class LocaleManager(val rM: RefreshManager) { } // TODO: Fix the actual Language implementation - Pull Request? + // Can't use a data class because we need to get the name of the language private class FixedLanguage(language: Language?) : Language(language?.getCode() ?: Language.UNKNOWN_LANG_CODE) { override fun hashCode() = this.getName().hashCode()