• The update method sounds good to me (I'm not sure if we could document that anywhere?). Or given the relatively few widgets that do this, we could just check in the draw method and then queue a call to drawWidgets if it changed?

    if ((Bangle.CLOCK==true) != (WIDGETS.widclk.width==0)) {
      WIDGETS.widclk.width = Bangle.CLOCK? 52 : 0; 
      return setTimeout(Bangle.drawWidgets,0);
    }
    

    I seem to recall there are some widgets that do similar things already.

    Using extra RAM is a bit of a shame on Bangle.js 1 but I guess it's not much - and actually adding an update method would be worse than the above

About

Avatar for Gordon @Gordon started