Avoid negative page values
This commit is contained in:
parent
9a115ec10b
commit
b02a173a69
@ -316,7 +316,7 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_translatePreviousPageIcons(value, ltr) {
|
_translatePreviousPageIcons(value, ltr) {
|
||||||
if (this._currentPage === 0)
|
if (this._currentPage <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const previousPage = this._currentPage - 1;
|
const previousPage = this._currentPage - 1;
|
||||||
@ -437,7 +437,7 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToPage(page, animate = true) {
|
goToPage(page, animate = true) {
|
||||||
if (this._currentPage === page)
|
if (this._currentPage === page || page < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._currentPage = page;
|
this._currentPage = page;
|
||||||
|
Loading…
Reference in New Issue
Block a user