DEV Community

Discussion on: βœ…[FIXED]βœ… πŸ—„ Android Room Database is not sending updates upon returning to a Fragment πŸ˜₯

Collapse
 
funkymuse profile image
FunkyMuse

Flowable isn't only backpressure related, it constantly emits a flow when the observe is present.

On attach isn't the best place to initiate the view model, onViewCreated is where it should be moved to.

Thread Thread
 
technoplato profile image
Michael Lustig - halfjew22@gmail.com

How is Flowable different than Observable in terms of what you’ve described?

Since this particular ViewMode is a singleton, I’m just getting a reference to it rather than instantiating it, so it shouldn’t matter much where that actually happens.