manas-chaudhari / android-mvvm

MVVM on Android using RxJava and Data Binding
Apache License 2.0
501 stars 81 forks source link

fixed bug with RecyclerView inside ViewPager #53

Closed mike-mathieu closed 7 years ago

mike-mathieu commented 7 years ago

there was a bug when a ViewPager had a RecyclerView nested inside it. Upon device rotation, something bad would happen with the state of the adapters (I can't really remember to be honest, I made this fix a while ago and it was quite difficult to track down).

mike-mathieu commented 7 years ago

Yes the executePendingBindings() is necessary to prevent memory leaks - on device rotation in my case, but maybe necessary elsewhere.

That's fine I have switched the name back to subscriptions.

manas-chaudhari commented 7 years ago

Awesome. @bigmikehoncho Thanks a lot for contributing :)