Closed shikokuchuo closed 1 year ago
Thanks for the suggestion! I took your idea of a reactive and used it to really simplify the concept in 9d73a762bc3f91f1dff153503f22baf9b02908c8 (and added a news entry with an acknowledgement in 65515d7a7a784072712515f4c9eb19c324c1f4d7). Now, the last observe()
really drives the concept home, and I like the whole app much more. So although I have decided not to merge the literal PR, it was still super helpful.
Looks good! But somehow there is now a mismatch between the written description and the code in terms of invalidateLater(millis = 1000)
. I'd suggest to keep it at 250 to be more responsive.
Thanks for catching that, it was left over from my testing code. Should be fixed now.
Almost there - the code block at the end hasn't caught up with the changes you made to the code above (which I really like)!
Thanks for looking. Would you point me to where you still see millis = 1000
? It took a couple commits, but I thought I got them.
That part’s good. It’s the moving the reactive_poll() statement to the end of the observe block, which I thought was a good call.
Ah, thanks for clarifying. Should be fixed now.
Prework
Related GitHub issues and pull requests
Summary
For efficiency, only poll when there are outstanding tasks. There are many ways to implement so feel free to modify / take what you want.