diff --git a/apps/chargent/ChangeLog b/apps/chargent/ChangeLog index d7172c8d2d..d7081ecfb0 100644 --- a/apps/chargent/ChangeLog +++ b/apps/chargent/ChangeLog @@ -2,3 +2,4 @@ 0.02: Support BangleJS2 0.03: Added threshold 0.04: Added notification +0.05: Fixed boot diff --git a/apps/chargent/boot.js b/apps/chargent/boot.js index 666fd3a041..c8fd4f930c 100644 --- a/apps/chargent/boot.js +++ b/apps/chargent/boot.js @@ -2,7 +2,7 @@ const pin = process.env.HWVERSION === 2 ? D3 : D30; var id; - Bangle.on('charging', (charging) => { + function gent(charging) { if (charging) { if (!id) { var max = 0; @@ -37,5 +37,8 @@ require('notify').hide({id: 'chargent'}); } } - }); + } + + Bangle.on('charging', gent); + if (Bangle.isCharging()) gent(true); })(); diff --git a/apps/chargent/metadata.json b/apps/chargent/metadata.json index dda0369a6c..d43493ada6 100644 --- a/apps/chargent/metadata.json +++ b/apps/chargent/metadata.json @@ -1,6 +1,6 @@ { "id": "chargent", "name": "Charge Gently", - "version": "0.04", + "version": "0.05", "description": "When charging, reminds you to disconnect the watch to prolong battery life.", "icon": "icon.png", "type": "bootloader",