oldergod / android-architecture

MVI architecture Implementation of the ToDo app.
Apache License 2.0
669 stars 70 forks source link

Clearing the disposables in onStop #55

Open lexkarel opened 5 years ago

oldergod commented 5 years ago

Why?

lzayas-chwy commented 5 years ago

Why?

I was reading the issue that was reported and I tried to fix it.

When the fragment becomes visible to the user we will subscribe to the view ViewModel observables and when the fragment is no longer visible to the user we'll clean all the subscriptions because we don't want to render a view state if the fragment isn't visible.