Add alert on error

This commit is contained in:
Alfonso Grillo
2023-01-25 18:40:09 +01:00
parent c1002c3945
commit 7494eb66e5
5 changed files with 24 additions and 11 deletions
@@ -70,8 +70,8 @@ private extension PollHistoryViewModel {
switch completion {
case .finished:
break
case .failure(_):
#warning("Handle errors")
case .failure:
self.completion?(.genericError)
}
}
@@ -86,13 +86,6 @@ private extension PollHistoryViewModel {
}
.store(in: &subcriptions)
pollService
.pollErrors
.sink { detail in
#warning("Handle errors")
}
.store(in: &subcriptions)
pollService
.fetchedUpTo
.weakAssign(to: \.state.syncedUpTo, on: self)