Title changed should check if the title really changed
Opened this issue · 4 comments
I think this image says it all, we're updating the title every x ms, but sometimes the text won't change (same second), I think it would be nice if the verbose renderer checked if (lastTitle === nextTitle) return; // Title didn't change
, thoughts?
For reference: https://github.com/LinusU/scandium/blob/master/lib/tasks.js#L68
Just wondering, why do you do it every 100ms? Why not every 1000ms? But I agree, it might be nice to check it.
If I do it every 1000ms it will be "jumpy" since it the timeout will not trigger on exact time (seconds) elapsed? 🤔 Maybe it works. I will try 👍
Yeah, since setTimeout
only guarantees that a minimum of that time will have passed, it will probably drift with each "second" being slightly longer than a second, and then suddenly two seconds will pass in one update...
Jup, feel free to send a PR!