- extend and improve the current swiftui glucose chart
- add siri glucose chart type
- add conditional handlers for frame, aspectRatio and padding etc
- tidy up ConstantsGlucoseChartSwiftUI file ro improve readability and remove unnecessary constants
- colour updates/corrections for all widgets
- remove gray color for not recent readings in watch complications
- when using standard apple widgetkit constraints, changing the colour of the bg value and delta to gray when > x minutes old makes no sense as it doesn't indicate that the bg readings are old, rather than that the complication hasn't gotten new data yet (which can be normal for the Watch complication updates).
96ec614a
* lower the number of readings to send to live activity to stay under 4kB
* change some widget attributes to be computed on demand
* change private widget attributes naming convention to match others
Live Activities have maximum payload size of 4kB.
At least Libre 2 EU produces so many values that they cannot be pushed to Live Activity unfiltered,
causing Live Activity start to fail with error: Payload maximum size exceeded.
Fix by downsampling (just pick every nth reading) to maximum of 100 readings.
The threshold value is got by trial and error, then tuning it down a bit to leave some room for different length strings.
using WKInterfaceDevice.current().screenBounds.size the chart size is modified together with text sizes in all views in order to make sure the view renders nicely in small watches
- also widget data is stored in a new userDefaults variable based upon the app bundle to avoid cross-contamination if various versions are installed on the same device