From c779410071e20a8ea9de0bf9d06f2724bebacc29 Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Fri, 9 Dec 2016 20:28:32 +0100 Subject: [PATCH] remove old countdown when new is selected --- src/extension.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/extension.js b/src/extension.js index ba84770..a9e4086 100644 --- a/src/extension.js +++ b/src/extension.js @@ -297,6 +297,7 @@ const TeaTime = new Lang.Class({ this.actor.add_actor( this._bGraphicalCountdown ? 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)); }, _getRemainingSec: function() {