1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-11-24 04:26:01 -06:00

Fix issues when loading lucky number (#297)

This commit is contained in:
Mikołaj Pich 2019-03-23 13:01:01 +01:00 committed by Rafał Borcz
parent 2d6610e05c
commit fc9981aa5d

View File

@ -22,7 +22,11 @@ class LuckyNumberPresenter @Inject constructor(
override fun onAttachView(view: LuckyNumberView) {
super.onAttachView(view)
Timber.i("Lucky number view is attached")
view.initView()
view.run {
initView()
showContent(false)
enableSwipe(false)
}
loadData()
}
@ -35,12 +39,6 @@ class LuckyNumberPresenter @Inject constructor(
.flatMapMaybe { luckyNumberRepository.getLuckyNumber(it, forceRefresh) }
.subscribeOn(schedulers.backgroundThread)
.observeOn(schedulers.mainThread)
.doOnSubscribe {
view?.run {
showContent(false)
enableSwipe(false)
}
}
.doFinally {
view?.run {
hideRefresh()