Skip to content

Commit 18c4914

Browse files
committed
Swift 6 language mode
1 parent 5b0e9c1 commit 18c4914

File tree

4 files changed

+323
-319
lines changed

4 files changed

+323
-319
lines changed

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ public class LiveViewCoordinator<R: RootRegistry>: ObservableObject {
8585
])))
8686
}
8787

88+
struct ReplyPayload: @unchecked Sendable {
89+
let payload: [String: Any]
90+
}
91+
8892
@discardableResult
8993
public func pushEvent(type: String, event: String, value: Any, target: Int? = nil) async throws -> [String:Any]? {
9094
return try await doPushEvent("event", payload: .jsonPayload(json: .object(object: [

Sources/LiveViewNative/ViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class FormModel: ObservableObject, CustomDebugStringConvertible {
6363
self.elementID = elementID
6464
}
6565

66-
@_spi(LiveForm) public func updateFromElement(_ element: ElementNode, submitAction: @escaping () -> ()) {
66+
@_spi(LiveForm) @preconcurrency public func updateFromElement(_ element: ElementNode, submitAction: @escaping () -> ()) {
6767
let pushEventImpl = pushEventImpl!
6868
self.changeEvent = element.attributeValue(for: .init(name: "phx-change")).flatMap({ event in
6969
{ value in
@@ -161,7 +161,7 @@ public class FormModel: ObservableObject, CustomDebugStringConvertible {
161161
// the `form` event type expects a URL encoded payload (e.g., `a=b&c=d`)
162162
_ = try await pushEventImpl("form", event, try buildFormQuery(), nil)
163163
}
164-
164+
165165
public nonisolated var debugDescription: String {
166166
return "FormModel(element: #\(elementID), id: \(ObjectIdentifier(self))"
167167
}

0 commit comments

Comments
 (0)