-
By the way, I'm not quite sure I fully understand the use of
show
(as it is right now).
Clocks are supposed to callshow
, most of the times emitting aredraw
, which eventually clocks are handling (on
) while drawing. Isn't this equivalent to just calling a redraw on the first place (assuming no one else emits anotherredraw
, which is the case for some clkinfos, like calendar date and battery).If I understood correctly, the simple
this.emit("redraw");
lets the clock decide when to update (in a convoluted but standard way), while other ways can force redrawing on some events or timers. Am I missing something?
As you say, the intervals are not needed, but I think
this.emit("redraw");
is a good idea, since I don't believe we're always redrawing right after calling.show
(just in case clockinfos can't get the data immediately)@glemco that's an interesting one though - maybe there are some clockinfos that don't do that