BangleApps
BangleApps copied to clipboard
[app/widbt_notify] screen not properly cleared after a pop-up
Affected hardware version
Bangle 2
Your firmware version
2v13
The bug
Screen is not properly cleared after widbt_notify popup.
Steps to reproduce
- Install widbt_notify.
- Run a dummy clock app.
function draw() {
g.reset();
g.clearRect(50,50,100,120);
g.drawString("01:01", 50, 50);
}
g.clear();
draw();
var secondInterval = setInterval(draw, 1000);
- Disconnect your watch from bluetooth.
Expected results: pop up appears, and the screen is showing 01:01 in a couple of seconds again.
Actual result: pop up appears, but the screen is not properly cleared.
I suspect the reason for that is how widbt_notify cleans up the screen:
redrawCurrentApp: function(){
if(typeof(draw)=='function'){
draw();
}else{
load(); // fallback. This might reset some variables
}
},
Do I understand correctly, that widbt_notify is incorrect in assuming that if the app has a draw()
function, it will correctly redraw the whole screen?
If this is true, the trivial fix would be just to call load()
regardless of the draw()
method.
E.showMessage(/*LANG*/'Connection\nlost.', 'Bluetooth');
setInterval(()=>{load();}, 3000);
CC @KungPhoo