Skip to content

Commit a74bc5a

Browse files
simlaycarson-katri
authored andcommitted
Initial changes for using uniffi bindings
1 parent 7bb57fd commit a74bc5a

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift

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

88-
struct ReplyPayload: @unchecked Sendable {
89-
let payload: [String: Any]
90-
}
91-
9288
@discardableResult
9389
public func pushEvent(type: String, event: String, value: Any, target: Int? = nil) async throws -> [String:Any]? {
9490
return try await doPushEvent("event", payload: .jsonPayload(json: .object(object: [
@@ -99,10 +95,6 @@ public class LiveViewCoordinator<R: RootRegistry>: ObservableObject {
9995
])))
10096
}
10197

102-
struct ReplyPayload: @unchecked Sendable {
103-
let payload: [String: Any]
104-
}
105-
10698
@discardableResult
10799
internal func doPushEvent(_ event: String, payload: LiveViewNativeCore.Payload) async throws -> [String:Any]? {
108100
guard let channel = channel else {

Sources/LiveViewNative/Utils/DOM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public struct ElementNode: Identifiable, @unchecked Sendable {
3232
self.data = data
3333
}
3434

35-
public var id: NodeRef { node.id }
35+
public var id: NodeRef { node.id() }
3636

3737
/// A sequence representing this element's direct children.
3838
public func children() -> NodeChildrenSequence { node.children() }

Sources/LiveViewNative/ViewTree.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct ViewTreeBuilder<R: RootRegistry> {
4949
let withID = applyID(element: element, to: bound)
5050
let withIDAndTag = applyTag(element: element, to: withID)
5151

52-
return ObservedElement.Observer.Applicator(element.node.id) {
52+
return ObservedElement.Observer.Applicator(element.node.id()) {
5353
withIDAndTag
5454
.environment(\.element, element)
5555
}

0 commit comments

Comments
 (0)