mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-27 09:44:55 +03:00
Fix MAL not binding a manga. Upgrade Kotlin to 1.0.2
This commit is contained in:
parent
70fabf6a6b
commit
8da11dbdb9
2 changed files with 3 additions and 4 deletions
|
@ -184,7 +184,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.0.1'
|
ext.kotlin_version = '1.0.2'
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ class MyAnimeListPresenter : BasePresenter<MyAnimeListFragment>() {
|
||||||
startableLatestCache(GET_MANGA_SYNC,
|
startableLatestCache(GET_MANGA_SYNC,
|
||||||
{ db.getMangaSync(manga, myAnimeList).asRxObservable()
|
{ db.getMangaSync(manga, myAnimeList).asRxObservable()
|
||||||
.doOnNext { mangaSync = it }
|
.doOnNext { mangaSync = it }
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread()) },
|
.observeOn(AndroidSchedulers.mainThread()) },
|
||||||
{ view, mangaSync -> view.setMangaSync(mangaSync) })
|
{ view, mangaSync -> view.setMangaSync(mangaSync) })
|
||||||
|
|
||||||
|
@ -98,12 +97,12 @@ class MyAnimeListPresenter : BasePresenter<MyAnimeListFragment>() {
|
||||||
private fun updateRemote() {
|
private fun updateRemote() {
|
||||||
mangaSync?.let { mangaSync ->
|
mangaSync?.let { mangaSync ->
|
||||||
add(myAnimeList.update(mangaSync)
|
add(myAnimeList.update(mangaSync)
|
||||||
.flatMap { response -> db.insertMangaSync(mangaSync).asRxObservable() }
|
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
|
.flatMap { response -> db.insertMangaSync(mangaSync).asRxObservable() }
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe({ next -> },
|
.subscribe({ next -> },
|
||||||
{ error ->
|
{ error ->
|
||||||
Timber.e(error.message)
|
Timber.e(error, error.message)
|
||||||
// Restart on error to set old values
|
// Restart on error to set old values
|
||||||
start(GET_MANGA_SYNC)
|
start(GET_MANGA_SYNC)
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue