diff --git a/ChatLayout/Classes/Core/Model/StateController.swift b/ChatLayout/Classes/Core/Model/StateController.swift index a0871795..d8d2f0e1 100644 --- a/ChatLayout/Classes/Core/Model/StateController.swift +++ b/ChatLayout/Classes/Core/Model/StateController.swift @@ -926,7 +926,7 @@ final class StateController { // 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) @@ -934,7 +934,7 @@ final class StateController { 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..