Replace more Kotlin synthetics

This commit is contained in:
arkon
2020-11-29 11:07:06 -05:00
parent 019a0f31c7
commit 66e3fa7df8
8 changed files with 18 additions and 23 deletions
@@ -36,7 +36,6 @@ import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.toast
import kotlinx.android.synthetic.main.main_activity.tabs
import kotlinx.coroutines.flow.drop
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.launchIn
@@ -206,7 +205,7 @@ class LibraryController(
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
super.onChangeStarted(handler, type)
if (type.isEnter) {
activity?.tabs?.setupWithViewPager(binding.libraryPager)
(activity as? MainActivity)?.binding?.tabs?.setupWithViewPager(binding.libraryPager)
presenter.subscribeLibrary()
}
}
@@ -277,7 +276,7 @@ class LibraryController(
// Delay the scroll position to allow the view to be properly measured.
view.post {
if (isAttached) {
activity?.tabs?.setScrollPosition(binding.libraryPager.currentItem, 0f, true)
(activity as? MainActivity)?.binding?.tabs?.setScrollPosition(binding.libraryPager.currentItem, 0f, true)
}
}