Skip to content
This repository has been archived by the owner. It is now read-only.

Cached ViewModels (of fragments) don't re-run lifecycle when with a new navigation #194

Open
vvolkgang opened this issue Mar 15, 2016 · 0 comments
Assignees

Comments

@vvolkgang
Copy link
Contributor

Creating an issue so I don't forget to PR this. If a fragment ViewModel is cached and re-used,it won't re-run the lifecycle with a new navigation.

Problem source

My current solution was to change MvxFragment.OnCreate to also run the lifecycle for the cached one. Need to test this in the sample to figure if something more is required.

This might be related to #112

Steps to reproduce

Need to implement custom code in the sample to repro this.

Expected behavior

ViewModel should run his lifecycle again, receiving the new navigation parameters and updating the view with new info

Actual behavior

Given that the ViewModel is cached and didn't ran the navigation, the view will have the previous info.

Configuration

Version: 4.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant