watch: fix snapshot sync and polish favourites UX
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user