Add loading view

This commit is contained in:
Alfonso Grillo
2023-01-20 12:11:12 +01:00
parent 1dd11beba3
commit 729da6d6e3
8 changed files with 93 additions and 11 deletions
@@ -17,8 +17,17 @@
import Combine
protocol PollHistoryServiceProtocol {
/// Publishes poll data as soon they are found in the timeline.
/// Updates are also published here, so clients needs to address duplicates.
var pollHistory: AnyPublisher<TimelinePollDetails, Never> { get }
/// Publishes whatever errors produced during the sync.
var error: AnyPublisher<Error, Never> { get }
func startFetching()
/// Ask to fetch the next batch of polls.
/// Concrete implementations can decide what a batch is.
func next()
/// Inform the whenever a new batch of polls starts or ends.
var isFetching: AnyPublisher<Bool, Never> { get }
}