Commit 21fab63
fix(apps): honour the unit preference on the Live Map page
The Map Overview (Live Map) page hard-defaulted to metric, so current speed / location-history
speed / odometer rendered km·h and km while the rest of the app (and the web) showed imperial
for the account. Thread the resolved unit preference into the page so the render boundary
converts to the account units.
- MapOverviewPage gains an optional units ctor arg passed through to its view-model (defaults
to metric, so the parameterless/test ctors are unchanged).
- The shell LiveMap factory passes AppSettingsHost.Current.ToUnitPref(); ApplySettings already
rebuilds the page on a units flip, so it stays in sync.
Gates: full sln build 0 err, dotnet format clean, 31537 tests pass.
Verified via live screenshot: Live Map now shows mph / mi matching http://localhost:3000.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 3013110 commit 21fab63
2 files changed
Lines changed: 7 additions & 3 deletions
File tree
- apps/windows/TeslaSync.App
- Shell
- feature-views/MapOverviewPage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | | - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1233 | 1235 | | |
1234 | 1236 | | |
1235 | 1237 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | | - | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
0 commit comments