From 6ea11508ef925e2230fea24380458e8d0718921d Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.comā©> Date: Thu, 1 Dec 2022 19:26:40 +0100 Subject: [PATCH] use widget_utils .hide() --- apps/aiclock/ChangeLog | 3 ++- apps/aiclock/aiclock.app.js | 3 +-- apps/aiclock/metadata.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/aiclock/ChangeLog b/apps/aiclock/ChangeLog index 31c55aef1..96b389f6e 100644 --- a/apps/aiclock/ChangeLog +++ b/apps/aiclock/ChangeLog @@ -1,3 +1,4 @@ 0.01: New app! 0.02: Design improvements and fixes. -0.03: Indicate battery level through line occurrence. \ No newline at end of file +0.03: Indicate battery level through line occurrence. +0.04: Use widget_utils module. diff --git a/apps/aiclock/aiclock.app.js b/apps/aiclock/aiclock.app.js index dbd053f2c..5d4e98fcd 100644 --- a/apps/aiclock/aiclock.app.js +++ b/apps/aiclock/aiclock.app.js @@ -215,8 +215,7 @@ Bangle.loadWidgets(); * so we will blank out the draw() functions of each widget and change the * area to the top bar doesn't get cleared. */ -for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";} - +require('widget_utils').hide(); // Clear the screen once, at startup and draw clock g.setTheme({bg:"#fff",fg:"#000",dark:false}).clear(); draw(); diff --git a/apps/aiclock/metadata.json b/apps/aiclock/metadata.json index 2124b1b7e..0da23e8ca 100644 --- a/apps/aiclock/metadata.json +++ b/apps/aiclock/metadata.json @@ -3,7 +3,7 @@ "name": "AI Clock", "shortName":"AI Clock", "icon": "aiclock.png", - "version":"0.03", + "version":"0.04", "readme": "README.md", "supports": ["BANGLEJS2"], "description": "A watch face that was designed by an AI (stable diffusion) and implemented by a human.",