Skip to content

Commit

Permalink
Merge pull request #1 from AleksandrSemakin/xcode-16.1-fix
Browse files Browse the repository at this point in the history
Fix xcode 16.1 compiler crash
  • Loading branch information
AleksandrSemakin authored Jan 9, 2025
2 parents 84e658b + 255e615 commit 891542e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ChatLayout/Classes/Core/Model/StateController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -926,15 +926,15 @@ final class StateController<Layout: ChatLayoutRepresentation> {
// Debug purposes only.
var attributes = [ChatLayoutAttributes]()
attributes.reserveCapacity(layout.sections.reduce(into: 0) { $0 += $1.items.count })
layout.sections.enumerated().forEach { sectionIndex, section in
for (sectionIndex, section) in layout.sections.enumerated() {
let sectionPath = ItemPath(item: 0, section: sectionIndex)
if let headerAttributes = itemAttributes(for: sectionPath, kind: .header, at: state, additionalAttributes: additionalAttributes) {
attributes.append(headerAttributes)
}
if let footerAttributes = itemAttributes(for: sectionPath, kind: .footer, at: state, additionalAttributes: additionalAttributes) {
attributes.append(footerAttributes)
}
section.items.enumerated().forEach { itemIndex, _ in
for itemIndex in 0..<section.items.count {
let itemPath = ItemPath(item: itemIndex, section: sectionIndex)
if let itemAttributes = itemAttributes(for: itemPath, kind: .cell, at: state, additionalAttributes: additionalAttributes) {
attributes.append(itemAttributes)
Expand Down

0 comments on commit 891542e

Please sign in to comment.