From 8da11dbdb9506e6c0d0e65b944b38f8544594f6a Mon Sep 17 00:00:00 2001 From: len Date: Fri, 13 May 2016 13:37:08 +0200 Subject: [PATCH] Fix MAL not binding a manga. Upgrade Kotlin to 1.0.2 --- app/build.gradle | 2 +- .../tachiyomi/ui/manga/myanimelist/MyAnimeListPresenter.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c07406c70..2afcc1412 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -184,7 +184,7 @@ dependencies { } buildscript { - ext.kotlin_version = '1.0.1' + ext.kotlin_version = '1.0.2' repositories { mavenCentral() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListPresenter.kt index ac28dbe38..6eedc4b90 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/myanimelist/MyAnimeListPresenter.kt @@ -44,7 +44,6 @@ class MyAnimeListPresenter : BasePresenter() { startableLatestCache(GET_MANGA_SYNC, { db.getMangaSync(manga, myAnimeList).asRxObservable() .doOnNext { mangaSync = it } - .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) }, { view, mangaSync -> view.setMangaSync(mangaSync) }) @@ -98,12 +97,12 @@ class MyAnimeListPresenter : BasePresenter() { private fun updateRemote() { mangaSync?.let { mangaSync -> add(myAnimeList.update(mangaSync) - .flatMap { response -> db.insertMangaSync(mangaSync).asRxObservable() } .subscribeOn(Schedulers.io()) + .flatMap { response -> db.insertMangaSync(mangaSync).asRxObservable() } .observeOn(AndroidSchedulers.mainThread()) .subscribe({ next -> }, { error -> - Timber.e(error.message) + Timber.e(error, error.message) // Restart on error to set old values start(GET_MANGA_SYNC) }))