Add workaround for bulkBarrierPreWrite: unaligned arguments

This commit is contained in:
世界
2024-12-14 20:12:26 +08:00
parent fe7dd4322f
commit ba6f99bc34
4 changed files with 6 additions and 15 deletions
@@ -165,7 +165,7 @@ public struct DashboardView: View {
return
}
await MainActor.run {
alert = Alert(title: Text("Service Error"), message: Text(message))
alert = Alert(title: Text("Service Error"), message: Text(message!.value))
}
}
+1 -2
View File
@@ -24,7 +24,7 @@ public extension Profile {
try write(remoteContent)
try await onProfileUpdated()
}
nonisolated func onProfileUpdated() async throws {
if await SharedPreferences.selectedProfileID.get() == id {
if let profile = try? await ExtensionProfile.load() {
@@ -34,5 +34,4 @@ public extension Profile {
}
}
}
}
@@ -35,12 +35,8 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
if options.getAutoRoute() {
settings.mtu = NSNumber(value: options.getMTU())
var error: NSError?
let dnsServer = options.getDNSServerAddress(&error)
if let error {
throw error
}
let dnsSettings = NEDNSSettings(servers: [dnsServer])
let dnsServer = try options.getDNSServerAddress()
let dnsSettings = NEDNSSettings(servers: [dnsServer.value])
dnsSettings.matchDomains = [""]
dnsSettings.matchDomainsNoSearch = true
settings.dnsSettings = dnsSettings
+2 -6
View File
@@ -26,12 +26,8 @@ public class HTTPClient {
request.setUserAgent(HTTPClient.userAgent)
try request.setURL(url)
let response = try request.execute()
var error: NSError?
let contentString = response.getContentString(&error)
if let error {
throw error
}
return contentString
let content = try response.getContent()
return content.value
}
deinit {