Skip to content

Commit 243b8da

Browse files
atulmguptaCopilot
andcommitted
fix(apps): honour the unit preference on the Climate Control page
The Climate Control page was registered with the 2-arg ctor that hard-pins UnitPref.Metric, so inside/outside/set temperatures rendered in °C while the rest of the app (and the web) used the account's imperial preference. Pass AppSettingsHost.Current.ToUnitPref() to the 3-arg ctor. This completes the units sweep for data-wired pages: the Drives/Charging/Trips/Vehicles list pages self-subscribe to settings; the dashboard widgets, Live Map and Climate are now passed the pref. (FleetCompare/Glance/TripPlanner/TripReplay/WatchFace are registered with empty/noop sources — they render no live data, so units are moot there; that is a separate data-wiring gap, not a units bug.) Gates: full sln build 0 err, dotnet format clean, 31537 tests pass. Verified via live screenshot: Climate Control now shows °F matching http://localhost:3000. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 21fab63 commit 243b8da

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/windows/TeslaSync.App/Shell/ShellWindow.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,9 @@ private void RegisterDataBackedPages()
10091009

10101010
_viewModel.PageFactory.Register("ClimateControl", () =>
10111011
new FeatureViews.VehicleSystems.ClimateControlPage(
1012-
new FeatureViews.VehicleSystems.ClimateClientFeed(_data.Api, _data.PrimaryVehicleId), _data.Localizer));
1012+
new FeatureViews.VehicleSystems.ClimateClientFeed(_data.Api, _data.PrimaryVehicleId),
1013+
_data.Localizer,
1014+
AppSettingsHost.Current.ToUnitPref()));
10131015

10141016
_viewModel.PageFactory.Register("MediaPlayer", () =>
10151017
new FeatureViews.VehicleSystems.MediaPlayerPage(

0 commit comments

Comments
 (0)