From 0205d6810c43622afef440a6b66d9a2b94085c74 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Wed, 16 Sep 2015 07:34:45 +0200 Subject: [PATCH] Fix some code for gnome-shell > 3.16 . --- src/extension.js | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/extension.js b/src/extension.js index 8055626..832f72c 100644 --- a/src/extension.js +++ b/src/extension.js @@ -328,16 +328,31 @@ let extensionHideNotification = function(animate) { if (animate) { - // JRL changes begin - this._tween(theNotification, '_notificationState', State.HIDDEN, - { y: yPos, - // JRL changes end - opacity: 0, - time: ANIMATION_TIME, - transition: 'easeOutQuad', - onComplete: this._hideNotificationCompleted, - onCompleteScope: this - }); + if (versionAtLeast('3.16', Config.PACKAGE_VERSION)) { + // JRL changes begin + this._tween(theNotification, '_notificationState', State.HIDDEN, + { y: yPos, + // JRL changes end + _opacity: 0, + time: ANIMATION_TIME, + transition: 'easeOutBack', + onUpdate: this._clampOpacity, + onUpdateScope: this, + onComplete: this._hideNotificationCompleted, + onCompleteScope: this + }); + } else { + // JRL changes begin + this._tween(theNotification, '_notificationState', State.HIDDEN, + { y: yPos, + // JRL changes end + opacity: 0, + time: ANIMATION_TIME, + transition: 'easeOutQuad', + onComplete: this._hideNotificationCompleted, + onCompleteScope: this + }); + } } else { // JRL changes begin Tweener.removeTweens(theNotification);