diff --git a/Sources/Other/CollectionReuseViewManager.swift b/Sources/Other/CollectionReuseViewManager.swift index a337a8e..1ee6675 100644 --- a/Sources/Other/CollectionReuseViewManager.swift +++ b/Sources/Other/CollectionReuseViewManager.swift @@ -40,6 +40,9 @@ public class CollectionReuseViewManager: NSObject { } else { reusableViews[identifier] = [view] } + if let collectionView = view as? CollectionView { + collectionView.provider = nil + } if let cleanupTimer = cleanupTimer { cleanupTimer.fireDate = Date().addingTimeInterval(lifeSpan) } else { diff --git a/Sources/Provider/FlattenedProvider.swift b/Sources/Provider/FlattenedProvider.swift index a5d36f4..e373828 100644 --- a/Sources/Provider/FlattenedProvider.swift +++ b/Sources/Provider/FlattenedProvider.swift @@ -70,7 +70,7 @@ struct FlattenedProvider: ItemProvider { func identifier(at: Int) -> String { let (sectionIndex, item) = indexPath(at) if let sectionData = childSections[sectionIndex].sectionData { - return provider.identifier(at: sectionIndex) + sectionData.identifier(at: item) + return provider.identifier(at: sectionIndex) + "-" + sectionData.identifier(at: item) } else { return provider.identifier(at: sectionIndex) }