From 0fb7bf42ec9bec2ad890ce28f792afe172cf49f8 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Tue, 11 Feb 2025 07:15:45 +0000 Subject: [PATCH] drained: redisplay immediately when charge status changes --- apps/drained/ChangeLog | 1 + apps/drained/app.js | 1 + apps/drained/app.ts | 1 + apps/drained/metadata.json | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/drained/ChangeLog b/apps/drained/ChangeLog index 0667d8ff6..af1ee299b 100644 --- a/apps/drained/ChangeLog +++ b/apps/drained/ChangeLog @@ -6,3 +6,4 @@ 0.05: Enhance menu: permit toggling bluetooth 0.06: Display clock in green when charging, with "charging" text 0.07: Correctly restore full power when the charged threshold is reached +0.08: Redisplay immediately on changes to charging status diff --git a/apps/drained/app.js b/apps/drained/app.js index cefddbcc7..9f8f6988f 100644 --- a/apps/drained/app.js +++ b/apps/drained/app.js @@ -118,6 +118,7 @@ Bangle.on("charging", function (charging) { drainedInterval = clearInterval(drainedInterval); if (charging) drainedInterval = setInterval(checkCharge, interval * 60 * 1000); + draw(); }); if (!keepStartup) { var storage = require("Storage"); diff --git a/apps/drained/app.ts b/apps/drained/app.ts index bd79ebcab..57c71e727 100644 --- a/apps/drained/app.ts +++ b/apps/drained/app.ts @@ -151,6 +151,7 @@ Bangle.on("charging", charging => { drainedInterval = clearInterval(drainedInterval) as undefined; if(charging) drainedInterval = setInterval(checkCharge, interval * 60 * 1000); + draw(); // redraw to update charging status on screen }); if(!keepStartup){ diff --git a/apps/drained/metadata.json b/apps/drained/metadata.json index eff9a331b..84addc803 100644 --- a/apps/drained/metadata.json +++ b/apps/drained/metadata.json @@ -1,7 +1,7 @@ { "id": "drained", "name": "Drained", - "version": "0.07", + "version": "0.08", "description": "Switches to displaying a simple clock when the battery percentage is low, and disables some peripherals", "readme": "README.md", "icon": "icon.png",