Add empty screen with number of days

This commit is contained in:
Alfonso Grillo
2023-01-20 16:42:37 +01:00
parent 84accd2470
commit 69726de367
7 changed files with 62 additions and 24 deletions
@@ -23,7 +23,7 @@ final class PollHistoryViewModel: PollHistoryViewModelType, PollHistoryViewModel
private let pollService: PollHistoryServiceProtocol
private var polls: [TimelinePollDetails] = []
private var subcriptions: Set<AnyCancellable> = .init()
private var hasLoadedFirstGroup: Bool = false
private var hasLoadedFirstGroup = false
var completion: ((PollHistoryViewModelResult) -> Void)?
@@ -87,6 +87,7 @@ private extension PollHistoryViewModel {
polls[matchIndex] = poll
} else {
polls.append(poll)
polls.sort(by: { $0.startDate > $1.startDate })
}
}