Voltaire // Fix Counting Error in Page Cycling.

This commit is contained in:
ShikiSuen 2022-02-16 11:23:46 +08:00
parent c67906b270
commit 22c72695ad
2 changed files with 12 additions and 8 deletions

View File

@ -260,10 +260,11 @@ public class HorizontalCandidateController: CandidateController {
}
if currentPage + 1 >= pageCount {
currentPage = 1
currentPage = 0
} else {
currentPage += 1
}
currentPage += 1
candidateView.highlightedIndex = 0
layoutCandidateView()
return true
@ -275,10 +276,11 @@ public class HorizontalCandidateController: CandidateController {
}
if currentPage == 0 {
currentPage = pageCount
currentPage = pageCount - 1
} else {
currentPage -= 1
}
currentPage -= 1
candidateView.highlightedIndex = 0
layoutCandidateView()
return true

View File

@ -266,10 +266,11 @@ public class VerticalCandidateController: CandidateController {
}
if currentPage + 1 >= pageCount {
currentPage = 1
currentPage = 0
} else {
currentPage += 1
}
currentPage += 1
candidateView.highlightedIndex = 0
layoutCandidateView()
return true
@ -281,10 +282,11 @@ public class VerticalCandidateController: CandidateController {
}
if currentPage == 0 {
currentPage = pageCount
currentPage = pageCount - 1
} else {
currentPage -= 1
}
currentPage -= 1
candidateView.highlightedIndex = 0
layoutCandidateView()
return true