Refactor task usage and profile auto update

This commit is contained in:
世界
2023-09-22 11:32:51 +08:00
parent 390e063f20
commit 3374f8e727
49 changed files with 823 additions and 636 deletions
@@ -3,10 +3,11 @@
import Library
import SwiftUI
@MainActor
public struct InstallSystemExtensionButton: View {
@State private var alert: Alert?
private let callback: () -> Void
public init(_ callback: @escaping () -> Void) {
private let callback: () async -> Void
public init(_ callback: @escaping () async -> Void) {
self.callback = callback
}
@@ -26,7 +27,7 @@
alert = Alert(errorMessage: "Need Reboot")
}
}
callback()
await callback()
} catch {
alert = Alert(error)
}