mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Refine loading logic
This commit is contained in:
@@ -65,15 +65,15 @@ private extension PollHistoryViewModel {
|
||||
|
||||
pollService
|
||||
.isFetching
|
||||
.filter { $0 }
|
||||
.first()
|
||||
.sink { isFetching in
|
||||
self.state.loadingState = .loading(firstLoad: true)
|
||||
self.state.loadingState = isFetching ? .loading(firstLoad: true) : .idle
|
||||
}
|
||||
.store(in: &subcriptions)
|
||||
|
||||
pollService
|
||||
.isFetching
|
||||
.dropFirst()
|
||||
.sink { isFetching in
|
||||
self.state.loadingState = isFetching ? .loading(firstLoad: false) : .idle
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user