• So, my watchface shows the seconds using setTimeout. I noticed that it will still redraw them even if a widget shows an E.showMessage above it. How do I handle that? Can I check for it somehow and then temporarily stop the timeout?

  • I noticed that it will still redraw them even if a widget shows an E.showMessage above it.

    Which widget is this? Widgets really shouldn't do that because it will definitely break things - all the default ones load up a new app to avoid that kind of problem. There's also the notify library that basically does that for you.

    But if you added a remove handler to setUI like this: http://www.espruino.com/Bangle.js+Fast+L­oad

    Then that would solve the problem, because showMessage would call the remove handler. But then after the message was gone you'd be left with nothing.

    ... and if the widget was running for pretty much any other app, that would break too - so I wouldn't recommend it

  • Ahh, ok. Yes, widbt_notify is a bit of a disaster.

    It should really use setOverlay now IMO - fixing that would really be the best bet

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to handle widget showing E.showMessage with the watchface?

Posted by Avatar for Hank @Hank

Actions