bluelinelabs / Conductor

A small, yet full-featured framework that allows building View-based Android applications
Apache License 2.0
3.9k stars 343 forks source link

Help migrating from version 3.0.0 to version 3.1.4 #668

Closed NoaD closed 2 years ago

NoaD commented 2 years ago

Hello I'm trying to migrate from version 3.0.0 that used rxjava to version 3.1.4 that is using archlifecycle.

my current code is has extension functions that bind to the lifecycle - and I'm trying to understand what is the code change needed to adjust it to archlifecycle and auto-dispose.

I would appreciate some help here - couldn't figure it out from the demo code.

    protected fun <C : RxController> Completable.bindToController(controller: C): Completable =
        observeOn(AndroidSchedulers.mainThread()).compose(controller.bindToLifecycle<Any>())

    protected fun <C : RxController> Completable.bindUntil(controller: C, event: ControllerEvent): Completable =
        observeOn(AndroidSchedulers.mainThread()).compose(controller.bindUntilEvent<Any>(event))

I assume that the controller type should be LifecycleController instead of RxController, but I don't understand what is the replacement of bindToLifecycle

EricKuck commented 2 years ago

Official RxJava support has ended, but the classes from previous versions should be perfectly usable. You can likely continue depending on the last published version of the Rx module, or alternatively just bring the code into your codebase.