[gnome-shell] appDisplay: Remove redundant checks for pageNumber



commit 551e57406d322eb290cfc93c032af6a939deee56
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 27 11:02:45 2014 -0400

    appDisplay: Remove redundant checks for pageNumber
    
    We already do these at the beginning of the function.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729064

 js/ui/appDisplay.js |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index cf570cf..2596929 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -472,14 +472,12 @@ const AllView = new Lang.Class({
         // longer than PAGE_SWITCH_TIME
         time = Math.min(time, PAGE_SWITCH_TIME);
 
-        if (pageNumber < this._grid.nPages() && pageNumber >= 0) {
-            this._currentPage = pageNumber;
-            Tweener.addTween(this._adjustment,
-                             { value: this._grid.getPageY(this._currentPage),
-                               time: time,
-                               transition: 'easeOutQuad' });
-            this._pageIndicators.setCurrentPage(pageNumber);
-        }
+        this._currentPage = pageNumber;
+        Tweener.addTween(this._adjustment,
+                         { value: this._grid.getPageY(this._currentPage),
+                           time: time,
+                           transition: 'easeOutQuad' });
+        this._pageIndicators.setCurrentPage(pageNumber);
     },
 
     _diffToPage: function (pageNumber) {


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