0.05: Fix `g` corruption issue if .hide gets called twice
parent
2b5a6a85a2
commit
ca50a4dbd9
|
|
@ -93,7 +93,7 @@
|
||||||
"name": "Fullscreen Notifications",
|
"name": "Fullscreen Notifications",
|
||||||
"shortName":"Notifications",
|
"shortName":"Notifications",
|
||||||
"icon": "notify.png",
|
"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.",
|
"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",
|
"tags": "widget",
|
||||||
"type": "notify",
|
"type": "notify",
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@
|
||||||
0.02: Add notification ID option
|
0.02: Add notification ID option
|
||||||
0.03: Fix custom render callback
|
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
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,10 @@ exports.hide = function(options) {
|
||||||
options = options||{};
|
options = options||{};
|
||||||
if ("id" in options && options.id!==id) return;
|
if ("id" in options && options.id!==id) return;
|
||||||
id = null;
|
id = null;
|
||||||
|
if (oldg) {
|
||||||
g=oldg;
|
g=oldg;
|
||||||
oldg = undefined;
|
oldg = undefined;
|
||||||
|
}
|
||||||
Bangle.removeListener("touch", exports.hide);
|
Bangle.removeListener("touch", exports.hide);
|
||||||
g.clear();
|
g.clear();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue