Handle number of batches / last batch

This commit is contained in:
Alfonso Grillo
2023-01-25 12:35:51 +01:00
parent ef19527856
commit aafe903e99
5 changed files with 37 additions and 15 deletions
@@ -50,6 +50,10 @@ final class PollHistoryService: PollHistoryServiceProtocol {
func nextBatch() -> AnyPublisher<TimelinePollDetails, Error> {
currentBatchSubject?.eraseToAnyPublisher() ?? startPagination()
}
var hasNextBatch: Bool {
timeline.canPaginate(.backwards)
}
}
private extension PollHistoryService {