0.05: Fix `g` corruption issue if .hide gets called twice

pull/561/head
Gordon Williams 2020-09-21 15:24:18 +01:00
parent 2b5a6a85a2
commit ca50a4dbd9
3 changed files with 7 additions and 4 deletions

View File

@ -93,7 +93,7 @@
"name": "Fullscreen Notifications",
"shortName":"Notifications",
"icon": "notify.png",
"version":"0.04",
"version":"0.05",
"description": "A handler for displaying notifications that displays them fullscreen. This may not fully restore the screen after on some apps. See `Notifications (default)` for more information about the notifications library.",
"tags": "widget",
"type": "notify",

View File

@ -1,4 +1,5 @@
0.01: New Library!
0.02: Add notification ID option
0.03: Fix custom render callback
0.04: Pass `area{x,y,w,h}` to render callback instead of just `y`
0.04: Pass `area{x,y,w,h}` to render callback instead of just `y`
0.05: Fix `g` corruption issue if .hide gets called twice

View File

@ -106,8 +106,10 @@ exports.hide = function(options) {
options = options||{};
if ("id" in options && options.id!==id) return;
id = null;
g=oldg;
oldg = undefined;
if (oldg) {
g=oldg;
oldg = undefined;
}
Bangle.removeListener("touch", exports.hide);
g.clear();
Bangle.drawWidgets();