diff options
author | Young Gyu Park <younggyu@google.com> | 2018-04-17 17:47:20 +0900 |
---|---|---|
committer | Young Gyu Park <younggyu@google.com> | 2018-04-17 17:53:00 +0900 |
commit | 0cef205aaa74773e2fd493ee711b001caf9ad8b1 (patch) | |
tree | c1e2fc23e2c7e3c70970552fe6ee8210ffe3d148 /src/main/java/com/android/vts/util/Pagination.java | |
parent | d3396241a4e1ea86e3609c4157be875cb2eb8d17 (diff) | |
download | dashboard-0cef205aaa74773e2fd493ee711b001caf9ad8b1.tar.gz |
Bug fix on pagination
Test: go/vts-web-staging/show_plan_release?plan=vts&type=suite&page=1
Bug: 77456536
Change-Id: I68ee4a73c70e6114364f643f0aa1ae1b92a41517
Diffstat (limited to 'src/main/java/com/android/vts/util/Pagination.java')
-rw-r--r-- | src/main/java/com/android/vts/util/Pagination.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/android/vts/util/Pagination.java b/src/main/java/com/android/vts/util/Pagination.java index 6223c35..ddf4d38 100644 --- a/src/main/java/com/android/vts/util/Pagination.java +++ b/src/main/java/com/android/vts/util/Pagination.java @@ -103,14 +103,14 @@ public class Pagination<T> implements Iterable<T> { this.totalCount / this.pageSize + (this.totalCount % this.pageSize == 0 ? 0 : 1); int iteratorIndex = 0; - int startIndex = (page % pageSize == 0 ? 1 : page % pageSize - 1) * pageSize; + int startIndex = (page % pageSize == 0 ? 9 : page % pageSize - 1) * pageSize; QueryResultIterator<T> resultIterator = query.iterator(); while (resultIterator.hasNext()) { if (startIndex <= iteratorIndex && iteratorIndex < startIndex + this.pageSize) this.list.add(resultIterator.next()); else resultIterator.next(); - if (iteratorIndex == DEFAULT_PAGE_SIZE * this.pageSize) { + if (iteratorIndex == DEFAULT_PAGE_WINDOW * this.pageSize) { this.nextPageCountToken = resultIterator.getCursor().toWebSafeString(); } iteratorIndex++; |