Skip to content

Commit

Permalink
Fix build issues after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
carson-katri committed Oct 17, 2024
1 parent c2a37ce commit 82a697e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ struct TabView<Root: RootRegistry>: View {
var body: some View {
if #available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *),
$liveElement.childNodes.contains(where: {
guard case let .element(element) = $0.data else { return false }
return element.tag == "Tab"
guard case let .nodeElement(element) = $0.data() else { return false }
return element.name.namespace == nil && element.name.name == "Tab"
})
{
if selectionAttribute != nil || changeAttribute != nil {
Expand Down Expand Up @@ -79,7 +79,7 @@ struct TabTreeBuilder<Root: RootRegistry, TabValue: Hashable> {
@TabContentBuilder<TabValue>
fileprivate func fromNode(_ node: Node, context: LiveContextStorage<Root>) -> some TabContent<TabValue> {
// ToolbarTreeBuilder.fromNode may not be called with a root or leaf node
if case .element(let element) = node.data {
if case .nodeElement(let element) = node.data() {
Self.lookup(ElementNode(node: node, data: element))
}
}
Expand Down
6 changes: 6 additions & 0 deletions Sources/LiveViewNative/__CoreExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
import LiveViewNativeCore
import Foundation

extension Node: Identifiable {
public var id: NodeRef {
self.id()
}
}

extension Channel {
func eventStream() -> AsyncThrowingStream<EventPayload, any Error> {
let events = self.events()
Expand Down

0 comments on commit 82a697e

Please sign in to comment.