Fix MainActor with defer compile error (#94)
This commit is contained in:
parent
47dd574b90
commit
7255c8dd4b
|
@ -45,8 +45,8 @@ private class FeatureModel: ObservableObject {
|
|||
func numberFactButtonTapped() {
|
||||
Task {
|
||||
self.isLoading = true
|
||||
defer { self.isLoading = false }
|
||||
self.fact = await getNumberFact(self.count)
|
||||
self.isLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ private class FeatureModel: ObservableObject {
|
|||
func numberFactButtonTapped() {
|
||||
Task {
|
||||
self.isLoading = true
|
||||
defer { self.isLoading = false }
|
||||
self.fact = await getNumberFact(self.count)
|
||||
self.isLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ it's as simple as adding it to a `dependencies` clause in your `Package.swift`:
|
|||
|
||||
``` swift
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pointfreeco/swiftui-navigation", from: "0.4.5")
|
||||
.package(url: "https://github.com/pointfreeco/swiftui-navigation", from: "0.7.1")
|
||||
]
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue