remove old countdown when new is selected

This commit is contained in:
Martin Kourim 2016-12-09 20:28:32 +01:00
parent 171b506c92
commit c779410071
No known key found for this signature in database
GPG Key ID: 3A6569468A8011F8

View File

@ -297,6 +297,7 @@ const TeaTime = new Lang.Class({
this.actor.add_actor( this._bGraphicalCountdown this.actor.add_actor( this._bGraphicalCountdown
? this._graphicalTimer : this._textualTimer); ? this._graphicalTimer : this._textualTimer);
if (this._idleTimeout != null) Mainloop.source_remove(this._idleTimeout);
this._idleTimeout = Mainloop.timeout_add_seconds(dt, Lang.bind(this, this._doCountdown)); this._idleTimeout = Mainloop.timeout_add_seconds(dt, Lang.bind(this, this._doCountdown));
}, },
_getRemainingSec: function() { _getRemainingSec: function() {