Commit 5e5f2df
* Fix device picker not updating chart data on multi-computer dives
Three issues fixed:
1. Picker showed devices with only fingerprint links (no samples) —
selecting them silently fell back to all samples. Now only devices
with actual sample data appear in the picker.
2. PPO2Chart used onChange(of: samples.count) which missed device
switches with equal sample counts. Changed to samples.cacheKey.
3. Added "All Computers" option to show combined data from all devices.
Closes #109
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix "All Computers" selection lost on data reload
The device picker reset selectedDeviceId on every loadDiveData call
when it was nil, but nil now means the user intentionally chose
"All Computers". Add a hasPickedDevice flag so the default device
is only set on first load, preserving the user's selection across
edit sheet dismissals and other refreshes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b8cb7ca commit 5e5f2df
1 file changed
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
238 | 245 | | |
239 | 246 | | |
240 | 247 | | |
241 | | - | |
| 248 | + | |
242 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
243 | 260 | | |
244 | | - | |
| 261 | + | |
245 | 262 | | |
246 | 263 | | |
247 | 264 | | |
| |||
255 | 272 | | |
256 | 273 | | |
257 | 274 | | |
258 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| |||
729 | 749 | | |
730 | 750 | | |
731 | 751 | | |
732 | | - | |
733 | | - | |
| 752 | + | |
734 | 753 | | |
| 754 | + | |
735 | 755 | | |
736 | 756 | | |
737 | 757 | | |
| |||
945 | 965 | | |
946 | 966 | | |
947 | 967 | | |
948 | | - | |
| 968 | + | |
949 | 969 | | |
950 | 970 | | |
951 | 971 | | |
| |||
0 commit comments