From 4c2170f9c5e476a036dec9a2d2ea33c9ba4f5ea2 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Wed, 1 Nov 2023 17:57:50 +0000 Subject: [PATCH] astral: setUI before loading widgets This fixes the sanity check warning: ``` Clock astral file calls loadWidgets before setUI (clock widget/etc won't be aware a clock app is running) ``` --- apps/astral/ChangeLog | 1 + apps/astral/app.js | 4 ++-- apps/astral/metadata.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/astral/ChangeLog b/apps/astral/ChangeLog index 17b623677..e77aa2ca2 100644 --- a/apps/astral/ChangeLog +++ b/apps/astral/ChangeLog @@ -5,3 +5,4 @@ 0.05: Added adjustment for Bangle.js magnetometer heading fix 0.06: optimized to update much faster 0.07: added support for bangle.js 2 +0.08: call setUI before loading widgets to indicate we're a clock diff --git a/apps/astral/app.js b/apps/astral/app.js index 88f3f7e0d..7c8f5512a 100644 --- a/apps/astral/app.js +++ b/apps/astral/app.js @@ -850,6 +850,8 @@ g.setBgColor(0, 0, 0); g.fillRect(0, 0, 175, 175); current_moonphase = getMoonPhase(); +Bangle.setUI("clock"); + // Load widgets Bangle.loadWidgets(); Bangle.drawWidgets(); @@ -865,8 +867,6 @@ Bangle.setGPSPower(1); var secondInterval; -Bangle.setUI("clock"); - autoUpdate(); setWatch(SwitchSensorState, BTN1, { repeat: true }); diff --git a/apps/astral/metadata.json b/apps/astral/metadata.json index 4b4922169..16696056f 100644 --- a/apps/astral/metadata.json +++ b/apps/astral/metadata.json @@ -1,7 +1,7 @@ { "id": "astral", "name": "Astral Clock", - "version": "0.07", + "version": "0.08", "description": "Clock that calculates and displays Alt Az positions of all planets, Sun as well as several other astronomy targets (customizable) and current Moon phase. Coordinates are calculated by GPS & time and onscreen compass assists orienting. See Readme before using.", "icon": "app-icon.png", "type": "clock",