Refactor databinding fields to parent abstract classes
This commit is contained in:
@@ -33,7 +33,7 @@ import rx.Subscription
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
class MangaController : RxController, TabbedController {
|
||||
class MangaController : RxController<MangaControllerBinding>, TabbedController {
|
||||
|
||||
constructor(manga: Manga?, fromSource: Boolean = false) : super(Bundle().apply {
|
||||
putLong(MANGA_EXTRA, manga?.id ?: 0)
|
||||
@@ -63,8 +63,6 @@ class MangaController : RxController, TabbedController {
|
||||
|
||||
val mangaFavoriteRelay: PublishRelay<Boolean> = PublishRelay.create()
|
||||
|
||||
private lateinit var binding: MangaControllerBinding
|
||||
|
||||
private val trackingIconRelay: BehaviorRelay<Boolean> = BehaviorRelay.create()
|
||||
|
||||
private var trackingIconSubscription: Subscription? = null
|
||||
|
||||
@@ -40,7 +40,7 @@ import reactivecircus.flowbinding.android.view.clicks
|
||||
import reactivecircus.flowbinding.swiperefreshlayout.refreshes
|
||||
import timber.log.Timber
|
||||
|
||||
class ChaptersController : NucleusController<ChaptersPresenter>(),
|
||||
class ChaptersController : NucleusController<ChaptersControllerBinding, ChaptersPresenter>(),
|
||||
ActionMode.Callback,
|
||||
FlexibleAdapter.OnItemClickListener,
|
||||
FlexibleAdapter.OnItemLongClickListener,
|
||||
@@ -64,8 +64,6 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
|
||||
|
||||
private var lastClickPosition = -1
|
||||
|
||||
private lateinit var binding: ChaptersControllerBinding
|
||||
|
||||
init {
|
||||
setHasOptionsMenu(true)
|
||||
setOptionsMenuHidden(true)
|
||||
|
||||
@@ -71,13 +71,11 @@ import uy.kohesive.injekt.injectLazy
|
||||
* UI related actions should be called from here.
|
||||
*/
|
||||
class MangaInfoController(private val fromSource: Boolean = false) :
|
||||
NucleusController<MangaInfoPresenter>(),
|
||||
NucleusController<MangaInfoControllerBinding, MangaInfoPresenter>(),
|
||||
ChangeMangaCategoriesDialog.Listener {
|
||||
|
||||
private val preferences: PreferencesHelper by injectLazy()
|
||||
|
||||
private lateinit var binding: MangaInfoControllerBinding
|
||||
|
||||
init {
|
||||
setHasOptionsMenu(true)
|
||||
setOptionsMenuHidden(true)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.swiperefreshlayout.refreshes
|
||||
import timber.log.Timber
|
||||
|
||||
class TrackController : NucleusController<TrackPresenter>(),
|
||||
class TrackController : NucleusController<TrackControllerBinding, TrackPresenter>(),
|
||||
TrackAdapter.OnClickListener,
|
||||
SetTrackStatusDialog.Listener,
|
||||
SetTrackChaptersDialog.Listener,
|
||||
@@ -25,8 +25,6 @@ class TrackController : NucleusController<TrackPresenter>(),
|
||||
|
||||
private var adapter: TrackAdapter? = null
|
||||
|
||||
private lateinit var binding: TrackControllerBinding
|
||||
|
||||
init {
|
||||
// There's no menu, but this avoids a bug when coming from the catalogue, where the menu
|
||||
// disappears if the searchview is expanded
|
||||
|
||||
Reference in New Issue
Block a user