`Animation.stopAnimation` never frees timer source nor emits signal
chaorace opened this issue · comments
Per the documentation, the Animation.stopAnimation
method should fire a signal when invoked, however, this currently never happens due to a bad if condition. Because glib always returns an ID rather than an object, self.timer
is never of type table and self.timer.stared
will never exist as a property. In addition to the missing signal, we're also never calling glib.source_remove
on the timer ID, which I assume has some unintended consequences? (I really don't know enough about glib to say for sure...)
I believe that this faulty condition is a holdover from a prior refactor, which would explain why it seems to be expecting a different data type than what is defined in glib. I think it should be updated to work properly with the refactored code so that stopping works as originally intended.