mirror of https://github.com/xaoxuu/ProHUD
MainActor
This commit is contained in:
parent
911702aa85
commit
d151c3c985
|
@ -22,7 +22,7 @@ open class AlertProvider: HUDProviderType {
|
||||||
// 详见子类中的 self.init(initializer: nil)
|
// 详见子类中的 self.init(initializer: nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Task {
|
Task { @MainActor in
|
||||||
let t = await Target()
|
let t = await Target()
|
||||||
initializer(t)
|
initializer(t)
|
||||||
await t.push()
|
await t.push()
|
||||||
|
|
|
@ -22,7 +22,7 @@ open class CapsuleProvider: HUDProviderType {
|
||||||
// 详见子类中的 self.init(initializer: nil)
|
// 详见子类中的 self.init(initializer: nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Task {
|
Task { @MainActor in
|
||||||
let t = await Target()
|
let t = await Target()
|
||||||
initializer(t)
|
initializer(t)
|
||||||
await t.push()
|
await t.push()
|
||||||
|
|
|
@ -22,7 +22,7 @@ public final class SheetProvider: HUDProviderType {
|
||||||
// 详见子类中的 self.init(initializer: nil)
|
// 详见子类中的 self.init(initializer: nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Task {
|
Task { @MainActor in
|
||||||
let t = await Target()
|
let t = await Target()
|
||||||
initializer(t)
|
initializer(t)
|
||||||
await t.push()
|
await t.push()
|
||||||
|
|
|
@ -22,7 +22,7 @@ open class ToastProvider: HUDProviderType {
|
||||||
// 详见子类中的 self.init(initializer: nil)
|
// 详见子类中的 self.init(initializer: nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Task {
|
Task { @MainActor in
|
||||||
let t = await Target()
|
let t = await Target()
|
||||||
initializer(t)
|
initializer(t)
|
||||||
await t.push()
|
await t.push()
|
||||||
|
|
Loading…
Reference in New Issue