async call

This commit is contained in:
xaoxuu 2024-05-28 11:07:01 +08:00
parent b2a73f1c1b
commit 911702aa85
5 changed files with 25 additions and 15 deletions

View File

@ -55,9 +55,11 @@ class TestToast: HUDProviderType {
// self.init(initializer: nil)
return
}
let t = Target()
Task {
let t = await Target()
initializer(t)
t.push()
await t.push()
}
}
/// ViewModelTarget

View File

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

View File

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

View File

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

View File

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