You are reading a single comment by @fewieden and its replies. Click here to read the full conversation.
  • @Hank on top of Gordon's suggestion with the layout module I would have those suggestions:

    • Replace your custom time handling with the locale module https://www.espruino.com/Bangle.js+Locale

      // Current time, e.g. 15:49
      require("locale").time(new Date(), 1);
      
      // First drink, e.g. 15:49
      require("locale").time(firstDrinkTime, 1);
      
    • You have a bunch of assignments like

      a = a + 1;
      b = b - 1;
      

    that can be shortened to

    a++;
    b--;
    
About

Avatar for fewieden @fewieden started