Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,15 @@ struct DynamicContainerInfo<Adapter>: StatefulRule, AsyncAttribute, ObservedAttr
var precedingCount: Int32 = 0
var allUnary = true
for index in 0..<inusedCount {
info.indexMap[info.items[index].uniqueId] = index
let item = info.items[index]
info.indexMap[item.uniqueId] = index
item.precedingViewCount = precedingCount
allUnary = allUnary && item.viewCount == 1
info.allUnary = allUnary
precedingCount &+= item.viewCount
if index != inusedCount {
precedingCount &+= item.viewCount
}
}
info.allUnary = allUnary
}
precondition(info.indexMap.count == inusedCount, "DynamicLayoutItem identifiers must be unique.")
if hasDepth {
Expand Down
Loading