Hey. I have an issue with `hiltNavGraphViewModels`...
# android
m
Hey. I have an issue with
hiltNavGraphViewModels
In my particular case I set the navigation graph programatically in Activity.onCreate method based on some result from LiveData observe subscription that is done in onCreate. It works because I have LiveData available straight away when Activity starts. Problem is when I have a configuration change event such as going from light to dark mode. App starts crashing because flow is somehow different when restoring state and
hiltNavGraphViewModels
gets called before Activity is in STARTED state. STARTED state is the state when LiveData start pushing data to the observers. Any ideas on how to go around it? Might be my fault is that I create UI based on some LiveData stream output and this is just wrong.
😶 2