bootloader 0.28: Fix double clock load after settings are changed

pull/774/head
Gordon Williams 2021-07-26 15:53:46 +01:00
parent 73b1cfde88
commit 6168782cf5
3 changed files with 5 additions and 6 deletions

View File

@ -4,7 +4,7 @@
"tags": "tool,system,b2", "tags": "tool,system,b2",
"type":"bootloader", "type":"bootloader",
"icon": "bootloader.png", "icon": "bootloader.png",
"version":"0.27", "version":"0.28",
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings", "description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
"storage": [ "storage": [
{"name":".boot0","url":"boot0.js"}, {"name":".boot0","url":"boot0.js"},
@ -3371,6 +3371,3 @@
] ]
} }
] ]

View File

@ -26,3 +26,4 @@
0.25: Fix error in 'no clock app' message 0.25: Fix error in 'no clock app' message
0.26: Remove buzz in setUI polyfill (#750) 0.26: Remove buzz in setUI polyfill (#750)
0.27: Update polyfill for most recent changes 0.27: Update polyfill for most recent changes
0.28: Fix double clock load after settings are changed

View File

@ -136,8 +136,9 @@ require('Storage').list(/\.boot\.js/).forEach(bootFile=>{
boot += "//"+bootFile+"\n"+require('Storage').read(bootFile)+"\n"; boot += "//"+bootFile+"\n"+require('Storage').read(bootFile)+"\n";
}); });
boot += "}\n";// initial 'if' boot += "}\n";// initial 'if'
var s = require('Storage').write('.boot0',boot); require('Storage').write('.boot0',boot);
delete boot; delete boot;
E.showMessage("Reloading..."); E.showMessage("Reloading...");
eval(require('Storage').read('.boot0')); eval(require('Storage').read('.boot0'));
eval(require('Storage').read('.bootcde')); // .bootcde should be run automatically after if required, since
// we normally get called automatically from '.boot0'