Skip to content

Commit 888e3db

Browse files
committed
Add DynamicViewListItem
1 parent b8410a9 commit 888e3db

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// DynamicViewListItem.swift
3+
// OpenSwiftUICore
4+
//
5+
// Audited for 6.5.4
6+
// Status: Complete
7+
8+
import OpenAttributeGraphShims
9+
10+
struct DynamicViewListItem: DynamicContainerItem {
11+
var id: ViewList.ID
12+
var elements: ViewList.Elements
13+
var traits: ViewTraitCollection
14+
var list: Attribute<any ViewList>?
15+
16+
var count: Int {
17+
elements.count
18+
}
19+
20+
var needsTransitions: Bool {
21+
traits.optionalTransition() != nil
22+
}
23+
24+
var zIndex: Double {
25+
traits.zIndex
26+
}
27+
28+
func matchesIdentity(of other: DynamicViewListItem) -> Bool {
29+
list == other.list && id == other.id
30+
}
31+
32+
var viewID: _ViewList_ID? { id }
33+
}

0 commit comments

Comments
 (0)