Skip to content

Commit

Permalink
#160: Now the mmols should be really rounded if there is not enough s…
Browse files Browse the repository at this point in the history
…pace on the complication
  • Loading branch information
dhermanns committed Sep 28, 2021
1 parent 5f17a6a commit 386b591
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion nightguard WatchKit App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>747</string>
<string>748</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
2 changes: 1 addition & 1 deletion nightguard WatchKit Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>747</string>
<string>748</string>
<key>CLKComplicationPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
<key>NSAppTransportSecurity</key>
Expand Down
12 changes: 6 additions & 6 deletions nightguard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 747;
CURRENT_PROJECT_VERSION = 748;
DEVELOPMENT_TEAM = BSAVUVP8PV;
INFOPLIST_FILE = "nightguard WatchKit Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -2132,7 +2132,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 747;
CURRENT_PROJECT_VERSION = 748;
DEVELOPMENT_TEAM = BSAVUVP8PV;
INFOPLIST_FILE = "nightguard WatchKit Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -2164,7 +2164,7 @@
CODE_SIGN_ENTITLEMENTS = "nightguard WatchKit App/nightguard.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 747;
CURRENT_PROJECT_VERSION = 748;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = BSAVUVP8PV;
IBSC_MODULE = scoutwatch_WatchKit_Extension;
Expand Down Expand Up @@ -2197,7 +2197,7 @@
CODE_SIGN_ENTITLEMENTS = "nightguard WatchKit App/nightguard.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 747;
CURRENT_PROJECT_VERSION = 748;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = BSAVUVP8PV;
IBSC_MODULE = scoutwatch_WatchKit_Extension;
Expand Down Expand Up @@ -2227,7 +2227,7 @@
CODE_SIGN_ENTITLEMENTS = nightguard/scoutwatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 747;
CURRENT_PROJECT_VERSION = 748;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = BSAVUVP8PV;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -2255,7 +2255,7 @@
CODE_SIGN_ENTITLEMENTS = nightguard/scoutwatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 747;
CURRENT_PROJECT_VERSION = 748;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = BSAVUVP8PV;
ENABLE_BITCODE = NO;
Expand Down
2 changes: 1 addition & 1 deletion nightguard/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>747</string>
<string>748</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
Expand Down
5 changes: 3 additions & 2 deletions nightguard/UnitsConverter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class UnitsConverter {
}

// Converts the internally mg/dL to mmol if thats the defined
// Unit to be used.
// Unit to be used. To save some space, the mmol values are rounded.
// This is used to display the values on the circular complication
static func mgdlToShortDisplayUnits(_ value : String) -> String {

if value == "---" {
Expand All @@ -63,7 +64,7 @@ class UnitsConverter {
return value
}

return toMmol(value)
return toRoundedMmol(value)
}

static func mgdlToDisplayUnitsWithSign(_ value : String) -> String {
Expand Down
2 changes: 1 addition & 1 deletion nightguardTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>747</string>
<string>748</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion nightguardUITests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>747</string>
<string>748</string>
</dict>
</plist>

0 comments on commit 386b591

Please sign in to comment.