Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes:
This Pull Request introduces two main changes:
Use Units from the Profile Store Instead of the Top-Level Units
Description:
store.units
) can differ from the units specified at the main level (profileData.units
) when using Loop.store.units
) when loading profile data.Implementation Details:
loadProfile
function to sourceself.units
fromstore.units
instead ofprofileData.units
.units
property to theNSProfile.Store
struct to facilitate this change.Future Considerations:
Time Zone Support for Profile Data Based on Looper's Time Zone
Description:
store.timezone
) when determining the current profile data.Implementation Details:
getCurrentValue
function to use the profile's time zone instead of the device's local time.getTimeZone(from:)
to handle various time zone formats and parse them intoTimeZone
objects.TimeZone
object in theProfileManager
to avoid re-evaluating it on each call, improving performance.Time Zone Format Handling:
"Europe/Stockholm"
and"Etc/GMT-2"
."ETC/GMT-2"
by normalizing them to standard IANA time zone identifiers.Thanks to Odd Stoltenberg for reporting these two issues.