[gnome-shell] messageTray: Simplify code



commit 143dfb62466ed9b2639a3e7d5fa1ae43af26a460
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Nov 4 14:16:28 2013 -0500

    messageTray: Simplify code
    
    If notificationRemoved, then mustClose is true, so we don't need to
    double-check for this.

 js/ui/messageTray.js |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 1e891fa..1959944 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2373,7 +2373,6 @@ const MessageTray = new Lang.Class({
                     this._showNotification();
             }
         } else if (this._notificationState == State.SHOWN) {
-            let pinned = this._pointerInNotification && !this._notificationRemoved;
             let expired = (this._userActiveWhileNotificationShown &&
                            this._notificationTimeoutId == 0 &&
                            !(this._notification.urgency == Urgency.CRITICAL) &&
@@ -2384,9 +2383,9 @@ const MessageTray = new Lang.Class({
             if (mustClose) {
                 let animate = hasNotifications && !this._notificationRemoved;
                 this._hideNotification(animate);
-            } else if (pinned && !this._notification.expanded) {
+            } else if (this._pointerInNotification && !this._notification.expanded) {
                 this._expandNotification(false);
-            } else if (pinned) {
+            } else if (this._pointerInNotification) {
                 this._ensureNotificationFocused();
             }
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]