Skip to content

Commit 7a664e2

Browse files
committed
Fixed detect composition layout.
1 parent b79c590 commit 7a664e2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

SPDiffable.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SPDiffable'
4-
s.version = '1.2.8'
4+
s.version = '1.2.9'
55
s.summary = 'Extenshion of Diffable API which allow not duplicate code and use less models.'
66
s.homepage = 'https://github.com/ivanvorobei/SPDiffable'
77
s.source = { :git => 'https://github.com/ivanvorobei/SPDiffable.git', :tag => s.version }

Sources/SPDiffable/DataSource/SPDiffableCollectionDataSource.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ open class SPDiffableCollectionDataSource: UICollectionViewDiffableDataSource<SP
9393
// In this case we shoudn't set header to section snapshot.
9494
// For this case it condition only.
9595
let headerAsFirstElement: Bool = {
96-
if collectionView?.collectionViewLayout is UICollectionViewFlowLayout {
97-
return false
98-
}
9996
if collectionView?.collectionViewLayout is UICollectionViewCompositionalLayout {
10097
return true
10198
}
99+
if collectionView?.collectionViewLayout is UICollectionViewFlowLayout {
100+
return false
101+
}
102102
return true
103103
}()
104104

0 commit comments

Comments
 (0)