(to be honest, I like the way DisposeOnDestroy wor...
# rx
v
(to be honest, I like the way DisposeOnDestroy works, maybe I will change my code to integrate a similar behavior)
m
Thanks. That's why I put it there. I'm pretty sure API will change, so it's 0.1.0, but I like if someone just grabs the code instead of using it as a dependency. Dependency is just for me, so I don't have to copy code between projects 🙂
v
Haha 🙂, I've done exactly the same thing for my projects ^^ : take a look : https://github.com/VincentMasselis/RxUIKotlin
I've found a way to have a lifecycle for custom views but I your approach with ActivityLifecycle and FragmentManagerLifecycle is better than mine which need Fragment and Activity inheritance
m
When I saw `doOnSubscribe`'s
Consumer
has
Disposable
as param, I knew I want to abuse it with an extension method like
disposeOnDestroy
😉
v
Yep, It's a good idea to use this method, I've discover this param when reading your code ^^