Closed LightningGem closed 1 year ago
Hi there, thanks for reporting it and adding enough details. I'll work on a fix next week
Bug fixed in release https://github.com/sebaslogen/resaca/releases/tag/2.4.5
For reference:
The bug was the key used in the ViewModelProvider, it was missing the key provided in hiltViewModelScoped
.
Since the ViewModel was correctly being removed and recreated by the library, the side effect was that the old Bundle from SavedStateHandle was restored.
The fix was to use the provided key in the ViewModelProvider and add an automated test to cover this case.
Thanks again for reporting the issue 😃
i have following VM:
After composable is recomposed with new hash, new viewModel is returned, but bundle hash value is old.