Commit Graph

11 Commits

Author SHA1 Message Date
Paul Plant 295d703be6 removal of ":" from the end of row labels
As the row label and text field have different and consistent formats (bold/colour), it can be implicitly seen that a given label applies to a given field/option so there's no real need to use a colon at the end.

By removing the colon from the string, we can also use them for titles etc without it looking strange

Whilst most labels previously had colons, many were missing which can give the UI a confusing look

Update Main.storyboard
2023-02-03 19:45:44 +00:00
Paul Plant f1eedbd63a update "Insulin" string to "Bolus" to avoid confusion between bolus/basal 2022-08-28 15:29:06 +02:00
Paul Plant 87a36da32d prevent future BG checks being added
- if the user tries to add a new (or modify an existing) BG check and set it's date in the future, warn them that it is not allowed and set the date to now.
- this is a safety feature for APS system that can use BG checks as part of their prediction as well as CGM values
2022-06-23 17:33:07 +02:00
Paul Plant 327a609aa5 implement treatment filtering in list
- the different treatment types (insulin, carbs, BG checks) can be filtered if required to show/hide them in the treatment table
- if boluses are shown, an option to filter micro-boluses is also enabled.
- button icon images are set individually as filled/unfilled to more clearly show if they are selected
- .getTreatments call reduced from 100 days to 21 days to save overhead
- previous settings options to show micro-boluses in the treatments table (and associated translations) removed as no longer needed
2022-06-23 16:21:59 +02:00
Paul Plant dd55733c0d BG Check treatments - initial translations 2022-05-20 14:52:38 +02:00
Paul Plant c3aba81cb2 add treatments screen improvements
- use .decimalPad keyboard for insulin entries
- change "New Entry" to "New Treatment" as the idea of a Treatment "Entry" is not intuitive to most users
- minor IB layout changes to enable future new treatment types to fit easily
2022-04-25 18:45:56 +02:00
Johan Degraeve 5c54bfc479 improvements treatments (not finished)
- TreatmentNSResponse : changed type of createdAt from String to Date
- TreatmentEntryAccessor : functions that use howOld as parameter, changed type from Int to TimeInterval
- created constant for maximum days to upload for treatments, default 7 days
- increased maximum amount of treatments to show in TreatmentsViewController to 100 days
- removed TODO : check that hTTPURLResponse.statusCode is 200
- removed checkIfDisReConnectAfterTimeStampFunction in comments of initializer NightScoutUploadManager (seems not used anymore)
- in DexcomShareUploadManager and NightScoutUploadManager : renamed upload to uploadLatestBgReadings to make clear distinction with other upload functions
- deleted xdrip/Texts/TextsNFCLibre.swift because it's not used (not related to treatments)
- renamed xdrip/Texts/TextsNightScoutTestResult.swift to xdrip/Texts/TextsNightScout.swift
- fix in getLatestTreatments, howOld
- removed getRequireUploadTreatments from TreatmentEntryAccessor, filter on treatments to upload is done in NightScoutUploader
- using a new value in UserDefaults to trigger a NightScout sync. Setting the value to true from anywhere will launch a new sync.
- quite some changes in NightScoutUploadManager
- TreatmentsViewController does not control the sync, it will just trigger it whenever necessary by setting UserDefaults.standard.nightScoutSyncTreatmentsRequired to true
- NightScoutSync is triggered from several places : create a new Treatment, update a Treatment, delete a Treatment, click the sync button
- Removed UIAlertController with result from NightScoutSync. It should always succeed. It's like uploading BgReading's.
- removed file TextsNightScoutTestResult.swift, seems not used
- in TreatmentNSResponse: matchesTreatmentEntry changed : check on date didn't work, not it compares date in milliseconds, that works.
- removed/changed some var's , coreDataManager for example which is now Implicitly Unwrapped Optionals, in stead of optional. This is something which could be improved throughout the project
- after download form NS : check if existing treatments are updated, and if so update locally
- delete treatments at NS : treatments deleted on the app are not permenanetly deleted from coredata, but there's a new attribute "treatmentDeleted" which is set to true. Which means will not be shown in table. It's needed to keep track of deletions at NS
2022-03-02 00:12:01 +01:00
eduardopietre 685fba194d Changed treatments_upload_complete strings to treatments_sync_complete. 2022-03-02 00:09:21 +01:00
eduardopietre 58657b7a94 Added missing localization for Treatments unit and label. 2022-03-02 00:05:28 +01:00
eduardopietre 48f63752a2 Improved UI. Now upload requires pressing upload. 2022-03-02 00:05:28 +01:00
eduardopietre 956c23b29d Implemented treatment, with persistence and uploading to nightscout. 2022-03-02 00:05:21 +01:00