mirror of https://github.com/espruino/BangleApps
barclock: ClockFace update: Hide widgets instead of not loading them
parent
a4a3d678dd
commit
99c575f09b
|
@ -14,3 +14,4 @@
|
|||
0.14: Use ClockFace_menu.addItems
|
||||
0.15: Add Power saving option
|
||||
0.16: Support Fast Loading
|
||||
0.17: Hide widgets instead of not loading them at all
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "barclock",
|
||||
"name": "Bar Clock",
|
||||
"version": "0.16",
|
||||
"version": "0.17",
|
||||
"description": "A simple digital clock showing seconds as a bar",
|
||||
"icon": "clock-bar.png",
|
||||
"screenshots": [{"url":"screenshot.png"},{"url":"screenshot_pm.png"}],
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
(function(back) {
|
||||
let s = require("Storage").readJSON("barclock.settings.json", true) || {};
|
||||
// migrate "don't load widgets" to "hide widgets"
|
||||
if (!("hideWidgets" in s) && ("loadWidgets" in s) && !s.loadWidgets) {
|
||||
s.hideWidgets = 1;
|
||||
}
|
||||
delete s.loadWidgets;
|
||||
|
||||
function save(key, value) {
|
||||
s[key] = value;
|
||||
|
@ -19,7 +24,7 @@
|
|||
};
|
||||
let items = {
|
||||
showDate: s.showDate,
|
||||
loadWidgets: s.loadWidgets,
|
||||
hideWidgets: s.hideWidgets,
|
||||
};
|
||||
// Power saving for Bangle.js 1 doesn't make sense (no updates while screen is off anyway)
|
||||
if (process.env.HWVERSION>1) {
|
||||
|
|
Loading…
Reference in New Issue