watch: fix snapshot sync and polish favourites UX

This commit is contained in:
FuelBoard Contributor
2026-08-31 07:48:20 +01:00
parent 486b8cff2e
commit 7a84364238
3 changed files with 132 additions and 76 deletions
+5 -3
View File
@@ -46,9 +46,11 @@ final class WatchSyncManager: NSObject, WCSessionDelegate {
if let favourites = try? JSONEncoder().encode(FuelStore.loadFavourites()) {
context[FuelStore.favouritesKey] = favourites
}
if let stations = try? JSONEncoder().encode(FuelStore.loadStations()) {
context[FuelStore.stationsKey] = stations
}
// Do NOT send the full station dump to watchOS via WatchConnectivity.
// The UK dataset is megabytes large and exceeds application-context
// payload limits, which prevents any snapshot from arriving. The
// favourites payload already carries station snapshots + prices, so the
// watch can render favourites without the full list.
context[FuelStore.fuelKey] = FuelStore.loadSelectedFuel().rawValue
context[FuelStore.distanceUnitKey] = FuelStore.loadDistanceUnit().rawValue