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
This commit is contained in:
Jasper St. Pierre 2014-04-27 11:02:45 -04:00
parent 1c8036b863
commit 551e57406d

View File

@ -472,14 +472,12 @@ const AllView = new Lang.Class({
// longer than PAGE_SWITCH_TIME // longer than PAGE_SWITCH_TIME
time = Math.min(time, PAGE_SWITCH_TIME); time = Math.min(time, PAGE_SWITCH_TIME);
if (pageNumber < this._grid.nPages() && pageNumber >= 0) { this._currentPage = pageNumber;
this._currentPage = pageNumber; Tweener.addTween(this._adjustment,
Tweener.addTween(this._adjustment, { value: this._grid.getPageY(this._currentPage),
{ value: this._grid.getPageY(this._currentPage), time: time,
time: time, transition: 'easeOutQuad' });
transition: 'easeOutQuad' }); this._pageIndicators.setCurrentPage(pageNumber);
this._pageIndicators.setCurrentPage(pageNumber);
}
}, },
_diffToPage: function (pageNumber) { _diffToPage: function (pageNumber) {