MainActor

This commit is contained in:
xaoxuu 2024-05-30 11:07:28 +08:00
parent 911702aa85
commit d151c3c985
4 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ open class AlertProvider: HUDProviderType {
// self.init(initializer: nil)
return
}
Task {
Task { @MainActor in
let t = await Target()
initializer(t)
await t.push()

View File

@ -22,7 +22,7 @@ open class CapsuleProvider: HUDProviderType {
// self.init(initializer: nil)
return
}
Task {
Task { @MainActor in
let t = await Target()
initializer(t)
await t.push()

View File

@ -22,7 +22,7 @@ public final class SheetProvider: HUDProviderType {
// self.init(initializer: nil)
return
}
Task {
Task { @MainActor in
let t = await Target()
initializer(t)
await t.push()

View File

@ -22,7 +22,7 @@ open class ToastProvider: HUDProviderType {
// self.init(initializer: nil)
return
}
Task {
Task { @MainActor in
let t = await Target()
initializer(t)
await t.push()