Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Commit

Permalink
Update to Fitbit SDK 4.1
Browse files Browse the repository at this point in the history
- Also fixed "break" text being cut off.
  • Loading branch information
aaronhktan committed Jun 8, 2020
1 parent 0092eb3 commit 71c8ba3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
7 changes: 6 additions & 1 deletion src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ me.addEventListener('unload', () => {
settings.save();
});

// Disable app timeout on SDK 2.2 onwards
if (me.appTimeoutEnabled) {
me.appTimeoutEnabled = false;
}

// Receive and parse new settings
messaging.peerSocket.onmessage = evt => {
if (evt.data.hasOwnProperty('key')) {
Expand Down Expand Up @@ -273,4 +278,4 @@ if (globals.state != 'initialize') {
* globals.secondsToEnd
/ Math.floor(settings.getCurrentDuration(globals.state)
* 60));
}
}
2 changes: 1 addition & 1 deletion src/app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ export default class UI {
get unitLabel() {
return this._unitText;
}
}
}
5 changes: 3 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"@fitbit/sdk": "~1.0.0",
"@fitbit/sdk": "^4.1.0",
"@fitbit/sdk-cli": "^1.0.2"
},
"fitbit": {
Expand All @@ -14,7 +14,8 @@
],
"buildTargets": [
"higgs",
"meson"
"meson",
"gemini"
],
"i18n": {
"en": {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/index.gui
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</gradientRect>

<text id="pomodoroText" x="2%" y="28%" text-length="14" pointer-events="none">Pomodoro #1</text>
<text id="stateText" x="2%" y="42%" text-length="16" pointer-events="none">Start a Pomodoro</text>
<text id="stateText" x="2%" y="42%" text-length="32" pointer-events="none">Start a Pomodoro</text>
<text id="minuteText" x="2%" y="92%" width="100%" text-length="7" pointer-events="none">25</text>
<text id="unitText" x="35%" y="92%" pointer-events="none">min</text>

Expand Down Expand Up @@ -39,4 +39,4 @@
<set href="combo-button-icon-press" attributeName="href" to="pause_press.png"/>
<set href="combo-button-stroke" attributeName="display" to="inline"/>
</use>
</svg>
</svg>
2 changes: 1 addition & 1 deletion src/resources/styles~300x300.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
fill: #C0C0C0;
font-family: Seville-Book;
font-size: 40;
}
}
2 changes: 1 addition & 1 deletion src/resources/styles~348x250.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
fill: #C0C0C0;
font-family: Seville-Book;
font-size: 40;
}
}

0 comments on commit 71c8ba3

Please sign in to comment.