From fe61fd2a1206bd7d07bc1237de9d3da713d7e1fb Mon Sep 17 00:00:00 2001 From: Richard de Boer Date: Sat, 7 Jan 2023 17:52:31 +0100 Subject: [PATCH] ClockFace: remove clockHasWidgets hack Added in 1d4fb1301a65b0f94eab0e4f6ae173112a68c627 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. --- modules/ClockFace.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/ClockFace.js b/modules/ClockFace.js index 1095b3613..10dfb9e43 100644 --- a/modules/ClockFace.js +++ b/modules/ClockFace.js @@ -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"]); }