From 7bd7b53845926f7d3d26c2ae9018e81cb9dced2b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 27 Nov 2012 13:15:50 -0500 Subject: [PATCH] panel: Remove a bit of duplicated code The play() method does what we want here. --- js/ui/panel.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index 0388acf80..9ac0db8ab 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -132,10 +132,8 @@ const AnimatedIcon = new Lang.Class({ _animationsLoaded: function() { this._isLoaded = true; - if (this._isPlaying) { - this._showFrame(0); - this._timeoutId = Mainloop.timeout_add(ANIMATED_ICON_UPDATE_TIMEOUT, Lang.bind(this, this._update)); - } + if (this._isPlaying) + this.play(); }, _onDestroy: function() {