From 49b2ca38ec486461093129e5d028faa61527e8f0 Mon Sep 17 00:00:00 2001 From: Eugene Kazaev Date: Mon, 19 Aug 2024 21:06:23 +0100 Subject: [PATCH] Fixed XCode 16.1 beta compiler issue --- ChatLayout.podspec | 4 ++-- .../Classes/Core/CollectionViewChatLayout.swift | 1 + ChatLayout/Classes/Core/Model/LayoutModel.swift | 1 + ChatLayout/Classes/Core/Model/SectionModel.swift | 1 + Example/Podfile.lock | 12 ++++++------ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChatLayout.podspec b/ChatLayout.podspec index 84235aff..1c0c5367 100644 --- a/ChatLayout.podspec +++ b/ChatLayout.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| s.name = 'ChatLayout' - s.version = '2.0.9' + s.version = '2.0.10' s.summary = 'Chat UI Library. It uses custom UICollectionViewLayout to provide you full control over the presentation.' - s.swift_version = '5.8' + s.swift_version = '5.10' s.description = <<-DESC ChatLayout is a Chat UI Library. It uses custom UICollectionViewLayout to provide you full control over the diff --git a/ChatLayout/Classes/Core/CollectionViewChatLayout.swift b/ChatLayout/Classes/Core/CollectionViewChatLayout.swift index c5f418a0..8ff8e2a8 100644 --- a/ChatLayout/Classes/Core/CollectionViewChatLayout.swift +++ b/ChatLayout/Classes/Core/CollectionViewChatLayout.swift @@ -399,6 +399,7 @@ open class CollectionViewChatLayout: UICollectionViewLayout { // Items var items: ContiguousArray = section.items items.withUnsafeMutableBufferPointer { directlyMutableItems in + nonisolated(unsafe) let directlyMutableItems = directlyMutableItems DispatchQueue.concurrentPerform(iterations: directlyMutableItems.count) { rowIndex in directlyMutableItems[rowIndex].resetSize() } diff --git a/ChatLayout/Classes/Core/Model/LayoutModel.swift b/ChatLayout/Classes/Core/Model/LayoutModel.swift index 2dc69549..a17b11de 100644 --- a/ChatLayout/Classes/Core/Model/LayoutModel.swift +++ b/ChatLayout/Classes/Core/Model/LayoutModel.swift @@ -138,6 +138,7 @@ final class LayoutModel { if index < sections.count &- 1 { let nextIndex = index &+ 1 sections.withUnsafeMutableBufferPointer { directlyMutableSections in + nonisolated(unsafe) let directlyMutableSections = directlyMutableSections DispatchQueue.concurrentPerform(iterations: directlyMutableSections.count &- nextIndex) { internalIndex in directlyMutableSections[internalIndex &+ nextIndex].offsetY += heightDiff } diff --git a/ChatLayout/Classes/Core/Model/SectionModel.swift b/ChatLayout/Classes/Core/Model/SectionModel.swift index 71112c0a..40812371 100644 --- a/ChatLayout/Classes/Core/Model/SectionModel.swift +++ b/ChatLayout/Classes/Core/Model/SectionModel.swift @@ -156,6 +156,7 @@ struct SectionModel { if index < items.count &- 1 { let nextIndex = index &+ 1 items.withUnsafeMutableBufferPointer { directlyMutableItems in + nonisolated(unsafe) let directlyMutableItems = directlyMutableItems DispatchQueue.concurrentPerform(iterations: directlyMutableItems.count &- nextIndex) { internalIndex in directlyMutableItems[internalIndex &+ nextIndex].offsetY += heightDiff } diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 27e256ec..ec81e1f2 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,10 +1,10 @@ PODS: - - ChatLayout (2.0.5): - - ChatLayout/Ultimate (= 2.0.5) - - ChatLayout/Core (2.0.5) - - ChatLayout/Extras (2.0.5): + - ChatLayout (2.0.9): + - ChatLayout/Ultimate (= 2.0.9) + - ChatLayout/Core (2.0.9) + - ChatLayout/Extras (2.0.9): - ChatLayout/Core - - ChatLayout/Ultimate (2.0.5): + - ChatLayout/Ultimate (2.0.9): - ChatLayout/Core - ChatLayout/Extras - DifferenceKit (1.3.0): @@ -35,7 +35,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - ChatLayout: 73e77fd1d5f3ea46dfee7045804d00116395bf04 + ChatLayout: 5c1b251ead6443c7cac14a16fc77822b2225e32e DifferenceKit: ab185c4d7f9cef8af3fcf593e5b387fb81e999ca FPSCounter: 884afec377de66637808c4f52ecc3b85a404732b InputBarAccessoryView: 1d7b0a672b36e370f01f264b3907ef39d03328e3