TDKCandidates // Let maxLinesPerPage modifiable.

This commit is contained in:
ShikiSuen 2022-10-08 23:37:18 +08:00
parent 4c44cf09c9
commit ab959a5c12
1 changed files with 19 additions and 7 deletions

View File

@ -70,13 +70,25 @@ public class CandidatePool {
}
public var maxLinesPerPage: Int {
switch currentLayout {
case .horizontal:
return maxRowsPerPage
case .vertical:
return maxColumnsPerPage
@unknown default:
return 0
get {
switch currentLayout {
case .horizontal:
return maxRowsPerPage
case .vertical:
return maxColumnsPerPage
@unknown default:
return 0
}
}
set {
switch currentLayout {
case .horizontal:
maxRowsPerPage = newValue
case .vertical:
maxColumnsPerPage = newValue
@unknown default:
return
}
}
}