Closed pandyah5 closed 1 year ago
This is much more complicated than I initially believed. Our current code has a lot of side-effects and the location data is not tracked/remembered. Hence, when we change configuration/activity/refresh the screen, the new location data is NOT propagated to the UI.
PS: The old method of using XML could have easily solved our need but hey the compose method is like a bitter pill that is good for long-term maintenance 🥲
Upon doing some googling and watching tutorials, I have come up with the following plan:
Source for more info on viewModels:
The resolution is as follows:
Fixed in 89481241c777a8b6764e2f92476fc395edcc3831
Hitting refresh should update the users live location and alter the safety message accordingly