Odyssey
Odyssey copied to clipboard
When Dialog is closed, ViewModel don't clear
I encountered same issue when using modalController with Hilt. The issue might be with rootController.measureLevel() function as it doesn't increase level for modal screens, so the function clearViewModelStoreOwnerByKey(key) doesn't clear viewModelStore.
Also onScreenRemove never gets called for modal screens, so it can be the issue.