Skip to content

Commit

Permalink
Minor fixes, GW v 1.1.10pre
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbuessow committed Dec 5, 2023
1 parent f504189 commit 2b4ad01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GlucoseWatchFace/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
launcherIcon="@Drawables.LauncherIcon"
name="@Strings.AppName"
type="watchface"
version="1.1.9.pre">
version="1.1.10.pre">
<iq:products>
<iq:product id="legacyherocaptainmarvel"/>
<iq:product id="fr55"/>
Expand Down
3 changes: 2 additions & 1 deletion GlucoseWatchFace/source/GlucoseWatchFaceView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ class GlucoseWatchFaceView extends Ui.WatchFace {
Ui.requestUpdate();
}

private function setVisible(id as String, visible as Boolean) as Void {
private function setVisible(id as String, visible as Boolean?) as Void {
var drawable = View.findDrawableById(id);
if (visible == null) { return; }
if (drawable != null) {
drawable.setVisible(visible);
}
Expand Down
7 changes: 4 additions & 3 deletions Shared/source/BaseServer.mc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class BaseServer {
data.setRemainingInsulin(msg["remainingInsulin"] as Float?);
data.setTemporaryBasalRate(msg["temporaryBasalRate"] as Float?);
data.setProfile(msg["profile"] as String?);
switch (msg["glucoseUnit"]) {
case "mmoll": data.setGlucoseUnit(Data.mmoll); break;
default: data.setGlucoseUnit(Data.mgdl); break;
if (msg["glucoseUnit"] != null && "mmoll".equals(msg["glucoseUnit"])) {
data.setGlucoseUnit(Data.mmoll);
} else {
data.setGlucoseUnit(Data.mgdl);
}

if (msg["connected"] instanceof Boolean) {
Expand Down

0 comments on commit 2b4ad01

Please sign in to comment.