widpedom 0.22: Fix 'stps' regression for 0.21 (fix #1233)

pull/1242/head
Gordon Williams 2022-01-07 08:53:32 +00:00
parent 3146b354be
commit 341080e09b
3 changed files with 3 additions and 2 deletions

View File

@ -1590,7 +1590,7 @@
{
"id": "widpedom",
"name": "Pedometer widget",
"version": "0.21",
"version": "0.22",
"description": "Daily pedometer widget",
"icon": "widget.png",
"type": "widget",

View File

@ -21,3 +21,4 @@
Memory usage enhancements
0.20: Fix issue where step count would randomly reset
0.21: Memory usage improvements, fix widget initial width (fix #1170)
0.22: Fix 'stps' regression for 0.21 (fix #1233)

View File

@ -55,6 +55,7 @@
// add your widget
WIDGETS["wpedom"]={area:"tl",width:0,
getWidth:function() {
let stps = stp_today.toString();
let newWidth = 24;
if (settings.hide)
newWidth = 0;
@ -68,7 +69,6 @@
return newWidth;
},
redraw:function() { // work out the width, and queue a full redraw if needed
let stps = stp_today.toString();
let newWidth = this.getWidth();
if (newWidth!=this.width) {
// width has changed, re-layout all widgets