Closed whyceewhite closed 9 years ago
The logging views had a distance unit parameter to calculate the units and display properly. However, since all the views are being loaded on start up, if the distance value changes then the update is not propogated to the views.
This was happening because the distance unit was nil but it returns Mile by default. When I set the setting to Kilometer, the other views already had Mile as the unit and, thus, resulted in the wrong distance value conversions.
Fixed by making the distance unit cached by providing the value in the CaDataManager
. Any updates to the setting will automatically be reflected in the cached property. All VCs were updated to use the cached property.
When my distance unit settings is equal to kilometers and I enter a trip, I notice that the Trips listing of the trip does not display the correct mileage. For example: