ClockFace: remove clockHasWidgets hack

Added in 1d4fb1301a to make fast loading
work correctly (workaround for the fact that ClockFace clocks contained
`loadWidgets` in their source, but sometimes didn't call it)
No longer needed, as we now always call loadWidgets.
pull/2469/head
Richard de Boer 2023-01-07 17:52:31 +01:00
parent 3bba0b6dab
commit fe61fd2a12
No known key found for this signature in database
1 changed files with 0 additions and 6 deletions

View File

@ -47,12 +47,6 @@ function ClockFace(options) {
if (this.hideWidgets===undefined && this.loadWidgets===false) this.hideWidgets = 1;
let s = require("Storage").readJSON("setting.json",1)||{};
if ((global.__FILE__===undefined || global.__FILE__===s.clock)
&& s.clockHasWidgets!==this.loadWidgets) {
// save whether we can Fast Load
s.clockHasWidgets = this.loadWidgets;
require("Storage").writeJSON("setting.json", s);
}
// use global 24/12-hour setting if not set by clock-settings
if (!('is12Hour' in this)) this.is12Hour = !!(s["12hour"]);
}