From 5ba54e7a85f397ccbe852c27f28581e1c5e09ab4 Mon Sep 17 00:00:00 2001 From: Martin Zwigl Date: Mon, 17 Mar 2025 22:27:56 +0100 Subject: [PATCH] Try with full data and set swipe handler to beginning --- apps/coin_info/app.js | 8 +++----- apps/coin_info/metadata.json | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/coin_info/app.js b/apps/coin_info/app.js index 5c84bce1d..afc05efbe 100644 --- a/apps/coin_info/app.js +++ b/apps/coin_info/app.js @@ -11,12 +11,13 @@ var timePeriod = "24h"; var tknChrtData = [5,6,5,6,5,6,5,6,5,6,5,6,5,6,]; +Bangle.on("swipe", swipeHandler); // function renderGraph(l) { // g.clearRect(l.x, l.y, l.w, l.h); const bounds = ciLib.findMinMax(tknChrtData); - logFile.write("?. graphy: " + JSON.stringify(bounds)); + logFile.write("?. graphy: " + JSON.stringify(bounds) + "\n"); require("graph").drawLine(g, tknChrtData, { axes: true, x: l.x, y: l.y, width: l.w, height: l.h, @@ -66,15 +67,13 @@ function getChart() { const apiData = JSON.parse(data.resp); tknChrtData = apiData.map(innerArray => innerArray[1]); // logFile.write("Chart data:" + JSON.stringify(tknChrtData)); - logFile.write("1. got data"); - tknChrtData = [1,2,3,4,5,6,7,8,9,8,7,6,5,4,]; + // tknChrtData = [1,2,3,4,5,6,7,8,9,8,7,6,5,4,]; currLoadMsg = ""; // // Manually clear and update the graph area g.clearRect(layout.tknGraph.x, layout.tknGraph.y, layout.tknGraph.w, layout.tknGraph.h); layout.forgetLazyState(); // Force a full re-render layout.render(layout.tknGraph); // Render just the graph area - logFile.write("2. rendered"); }) .catch(err => { // logFile.write("API Error: " + JSON.stringify(err)); @@ -132,7 +131,6 @@ draw(); getChart(); // -Bangle.on("swipe", swipeHandler); Bangle.loadWidgets(); // loading widgets after drawing the layout in `drawMain()` to display the app UI ASAP. require("widget_utils").swipeOn(); // hide widgets, make them visible with a swipe // Bangle.setUI({ diff --git a/apps/coin_info/metadata.json b/apps/coin_info/metadata.json index f66e3d0af..0e4673fa4 100644 --- a/apps/coin_info/metadata.json +++ b/apps/coin_info/metadata.json @@ -1,7 +1,7 @@ { "id": "coin_info", "name": "Crypto-Coins Info", "shortName":"Coins Info", - "version": "0.06.42", + "version": "0.06.43", "description": "Crypto-Coins Infos with the help of the Binance API", "icon": "app.png", "tags": "clkinfo",