From 60a7cbcf5b346be9afee75c269076f3ec386815b Mon Sep 17 00:00:00 2001 From: Gabriele Monaco Date: Wed, 1 Nov 2023 11:07:00 +0100 Subject: [PATCH 1/2] cards: hiding widgets while showing the code --- apps/cards/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/cards/app.js b/apps/cards/app.js index dcef7da76..33b4c9e15 100644 --- a/apps/cards/app.js +++ b/apps/cards/app.js @@ -18,9 +18,8 @@ Bangle.drawWidgets(); const WHITE=-1 const BLACK=0 -var FILE = "android.cards.json"; - -var Locale = require("locale"); +const Locale = require("locale"); +const widget_utils = require('widget_utils'); var fontSmall = "6x8"; var fontMedium = g.getFonts().includes("6x15")?"6x15":"6x8:2"; @@ -90,6 +89,7 @@ function printLinearCode(binary) { } function showCode(card) { + widget_utils.hide(); E.showScroller(); // keeping it on rising edge would come back twice.. setWatch(()=>showCard(card), BTN, {edge:"falling"}); @@ -151,6 +151,7 @@ function showCard(card) { var titleColor = g.theme.fg2; if (card.color) titleColor = isLight(titleBgColor) ? BLACK : WHITE; + widget_utils.show(); E.showScroller({ h : g.getFontHeight(), // height of each menu item in pixels c : lines.length, // number of menu items From 6433ae0a11b798d9298b593a84b51e1a994ee610 Mon Sep 17 00:00:00 2001 From: Gabriele Monaco Date: Fri, 3 Nov 2023 06:51:30 +0100 Subject: [PATCH 2/2] cards: bump version and changelog --- apps/cards/ChangeLog | 1 + apps/cards/metadata.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/cards/ChangeLog b/apps/cards/ChangeLog index 00945cd13..24c1bf8ff 100644 --- a/apps/cards/ChangeLog +++ b/apps/cards/ChangeLog @@ -1 +1,2 @@ 0.01: Simple app to display loyalty cards +0.02: Hiding widgets while showing the code diff --git a/apps/cards/metadata.json b/apps/cards/metadata.json index 63b7da847..810741d5f 100644 --- a/apps/cards/metadata.json +++ b/apps/cards/metadata.json @@ -1,7 +1,7 @@ { "id": "cards", "name": "Cards", - "version": "0.01", + "version": "0.02", "description": "Display loyalty cards", "icon": "app.png", "screenshots": [{"url":"screenshot_cards_overview.png"}, {"url":"screenshot_cards_card1.png"}, {"url":"screenshot_cards_card2.png"}, {"url":"screenshot_cards_barcode.png"}, {"url":"screenshot_cards_qrcode.png"}],