Fix MainActor with defer compile error (#94)

This commit is contained in:
유재호 2023-03-21 10:42:29 +09:00 committed by GitHub
parent 47dd574b90
commit 7255c8dd4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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")
]
```