Closed lkkz closed 4 years ago
Call bindUntilEvent()
after observeOn()
and it should work correctly. For more info, see #224.
thanks!
@dlew Hi, I used rxlife1.0 and rxjava2 in my project,It's seems OK to write like 'call bindUntilEvent() before observeOn()' in before,but when I used rxlife4.x and rxjava3 , I had the same problem,but this happens only occasionally,Is this due to the change caused by 4.x or rxjava3,Or means the old version will also happen, but I didn't find it?
I met a problem, I use observeOn (AndroidSchedulers. MainThread (), cut to the main thread, has in onDestroy call the subscribe, have a chance discovery, below is the code and log
code: class KotlinActivity : RxAppCompatActivity() {
}
log:
2020-06-08 17:01:11.510 8485-8485/com.trello.rxlifecycle4.sample I/RxLifecycle-Kotlin: Started in onCreate(), running until onDestroy(): 0 2020-06-08 17:01:12.510 8485-8485/com.trello.rxlifecycle4.sample I/RxLifecycle-Kotlin: Unsubscribing subscription from onCreate() 2020-06-08 17:01:12.511 8485-8485/com.trello.rxlifecycle4.sample D/RxLifecycle-Kotlin: onDestroy() 2020-06-08 17:01:12.518 8485-8485/com.trello.rxlifecycle4.sample I/RxLifecycle-Kotlin: Started in onCreate(), running until onDestroy(): 1