forked from github/wulkanowy-mirror
Fix empty container id in grade fragemnt adapter (#289)
This commit is contained in:
parent
5add95ece1
commit
20d0abba29
@ -7,9 +7,7 @@ import io.github.wulkanowy.ui.base.session.BaseSessionPresenter
|
|||||||
import io.github.wulkanowy.ui.base.session.SessionErrorHandler
|
import io.github.wulkanowy.ui.base.session.SessionErrorHandler
|
||||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||||
import io.github.wulkanowy.utils.SchedulersProvider
|
import io.github.wulkanowy.utils.SchedulersProvider
|
||||||
import io.reactivex.Completable
|
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class GradePresenter @Inject constructor(
|
class GradePresenter @Inject constructor(
|
||||||
@ -30,15 +28,12 @@ class GradePresenter @Inject constructor(
|
|||||||
fun onAttachView(view: GradeView, savedIndex: Int?) {
|
fun onAttachView(view: GradeView, savedIndex: Int?) {
|
||||||
super.onAttachView(view)
|
super.onAttachView(view)
|
||||||
Timber.i("Grade view is attached")
|
Timber.i("Grade view is attached")
|
||||||
disposable.add(Completable.timer(150, MILLISECONDS, schedulers.mainThread)
|
selectedIndex = savedIndex ?: 0
|
||||||
.subscribe {
|
view.run {
|
||||||
selectedIndex = savedIndex ?: 0
|
initView()
|
||||||
view.run {
|
enableSwipe(false)
|
||||||
initView()
|
}
|
||||||
enableSwipe(false)
|
loadData()
|
||||||
}
|
|
||||||
loadData()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onCreateMenu() {
|
fun onCreateMenu() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user