• It looks like the widget already tries not to run for clock apps: https://github.com/espruino/BangleApps/b­lob/d9d5926416566762e59b953c745f989d23c9­b334/apps/widclk/widget.js#L6

    But Bangle.CLOCK is only set if the clock uses Bangle.setUI(), so maybe your clock app doesn't use that?

    If that's the case, I guess we should modify the widget to (also) check using __FILE__:

    (()=>{
      if (Bangle.CLOCK) {return;} // app used setUI('clock') or setUI('clockupdown')
    
      // app didn't call Bangle.setUI('clock...'), but might still be a clock, 
      // look at <appid>.info to make sure
      if (typeof __FILE__ === 'string') { // only exists since 2v09
        const info = require("Storage").readJSON(__FILE__.spl­it(".")[0]+".info",1)||false;
        if (info && info.type==="clock") { // info can have no type (but then it isn't a clock)
          return;
        }
      }
    
      // current app is not a clock:
      WIDGETS["wdclk"]={...};
    })();
    
About

Avatar for rigrig @rigrig started