Send objectWillChange in CategoryDataStore prior to updates
This commit is contained in:
parent
ce89e130ac
commit
e0467797d9
1 changed files with 2 additions and 1 deletions
|
@ -24,13 +24,14 @@ class CategoryDataStore: ObservableObject {
|
|||
switch completion {
|
||||
case .finished:
|
||||
self.currentRequest = nil
|
||||
self.objectWillChange.send() // TODO: Remove hack after finding better way to update dictionary values
|
||||
return
|
||||
case .failure(let error):
|
||||
self.objectWillChange.send() // TODO: Remove hack after finding better way to update dictionary values
|
||||
self.categories[requestId] = .failure(error)
|
||||
}
|
||||
}, receiveValue: { (categories) in
|
||||
print("Received \(categories.count) categories")
|
||||
self.objectWillChange.send() // TODO: Remove hack after finding better way to update dictionary values
|
||||
self.categories[requestId] = .success(categories)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue