1
0
Fork 0

Merge pull request #2272 from halemmerich/slopeclock

Slopeclock/pp - Reset graphics to remove font from memory
master
Gordon Williams 2022-11-15 08:54:55 +00:00 committed by GitHub
commit c2e8b2ab98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 2 deletions

View File

@ -1 +1,2 @@
0.01: New App! 0.01: New App!
0.02: Reset font to save some memory during remove

View File

@ -107,6 +107,8 @@ Bangle.setUI({
animInterval = undefined; animInterval = undefined;
if (drawTimeout) clearTimeout(drawTimeout); if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined; drawTimeout = undefined;
// Remove the loaded font if app is changed during animation
g.reset();
delete Graphics.prototype.setFontPaytoneOne; delete Graphics.prototype.setFontPaytoneOne;
}}); }});
// Load widgets // Load widgets

View File

@ -1,6 +1,6 @@
{ "id": "slopeclock", { "id": "slopeclock",
"name": "Slope Clock", "name": "Slope Clock",
"version":"0.01", "version":"0.02",
"description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen", "description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen",
"icon": "app.png", "icon": "app.png",
"screenshots": [{"url":"screenshot.png"}], "screenshots": [{"url":"screenshot.png"}],

View File

@ -1,2 +1,3 @@
0.01: Clone of original SlopeClock 0.01: Clone of original SlopeClock
0.02: Added configuration 0.02: Added configuration
0.03: Reset font to save some memory during remove

View File

@ -230,6 +230,8 @@ Bangle.setUI({
animInterval = undefined; animInterval = undefined;
if (drawTimeout) clearTimeout(drawTimeout); if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined; drawTimeout = undefined;
// Remove the loaded font if app is changed during animation
g.reset();
delete Graphics.prototype.setFontPaytoneOne; delete Graphics.prototype.setFontPaytoneOne;
}}); }});
// Load widgets // Load widgets

View File

@ -1,6 +1,6 @@
{ "id": "slopeclockpp", { "id": "slopeclockpp",
"name": "Slope Clock ++", "name": "Slope Clock ++",
"version":"0.02", "version":"0.03",
"description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which can show the weather and steps.", "description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which can show the weather and steps.",
"icon": "app.png", "icon": "app.png",
"screenshots": [{"url":"screenshot.png"}], "screenshots": [{"url":"screenshot.png"}],