Handle live polls

This commit is contained in:
Alfonso Grillo
2023-01-25 17:52:39 +01:00
parent cddf935fa8
commit 2e3aa18f6c
4 changed files with 67 additions and 5 deletions
@@ -28,6 +28,9 @@ protocol PollHistoryServiceProtocol {
/// Note: `nextBatch()` will continue to publish new polls even if some poll isn't being aggregated correctly.
var pollErrors: AnyPublisher<Error, Never> { get }
/// Publishes live polls not related with the current batch.
var livePolls: AnyPublisher<TimelinePollDetails, Never> { get }
/// Returns true every time the service can fetch another batch.
/// There is no guarantee the `nextBatch()` returned publisher will publish something anyway.
var hasNextBatch: Bool { get }