You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The explanation is a bit beyond my understanding, but I think it's because the fragment is never really destroyed on configuration changes, so using it as the life cycle owner results in duplicate observers.
The text was updated successfully, but these errors were encountered:
The reason is as you said, using viewLifecycleOwner will prevent on resuscribing to the observers, hence preventing them to be notified twice, also, the observers will be removed depending on the lifecycle of the Fragment that suscribes to it.
I'm looking at this method from TasksFragment:
I read here that the life cycle owner should be viewLifecycleOwner instead of the fragment instance, like this:
The explanation is a bit beyond my understanding, but I think it's because the fragment is never really destroyed on configuration changes, so using it as the life cycle owner results in duplicate observers.
The text was updated successfully, but these errors were encountered: