• There remains one small thing to get the current state working correctly with regard to widgets.
    Currently some widgets prevent themselves from being loaded depending on Bangle.CLOCK.
    I have checked and only found widclk,widclkbttm,widclose and widcloselaunch to have this problem. We could solve this by just checking Bangle.CLOCK on every draw and react accordingly or we could define widgets to have an update method to tell them to recheck their environment.
    Implementation on the Bangle side of things could be done by calling all available update methods on widgets at the end of Bangle.setUI and Bangle.loadWidgets. Update method is better when widgets change their width depending on CLOCK and prevents additional calls to drawWidgets which would be needed when draw changes the width.

    The small negative impact of this would be loading the 4 mentioned widgets even if a clock app is active. Since they are all on the order of 10 lines of code this is probably not a problem. Solving the problem for theoretical future big widgets would be possible by having the update method un/load the big pieces of code on demand.

    I have tried the update method way and have not found any problems with it the last few days.

About

Avatar for halemmerich @halemmerich started