88
99import UIKit
1010
11- open class CollectionViewAdapter < Element> : Updating {
11+ public struct CollectionViewAdapter < Element> : Updating {
1212
1313 public unowned let collectionView : UICollectionView
1414
@@ -20,27 +20,27 @@ open class CollectionViewAdapter<Element>: Updating {
2020 self . collectionView = collectionView
2121 }
2222
23- open func insertItems( at indexPaths: [ IndexPath ] , in context: UpdateContext < Element > ) {
23+ public func insertItems( at indexPaths: [ IndexPath ] , in context: UpdateContext < Element > ) {
2424
2525 collectionView. insertItems ( at: indexPaths)
2626 }
2727
28- open func deleteItems( at indexPaths: [ IndexPath ] , in context: UpdateContext < Element > ) {
28+ public func deleteItems( at indexPaths: [ IndexPath ] , in context: UpdateContext < Element > ) {
2929
3030 collectionView. deleteItems ( at: indexPaths)
3131 }
3232
33- open func reloadItems( at indexPaths: [ IndexPath ] , in context: UpdateContext < Element > ) {
33+ public func reloadItems( at indexPaths: [ IndexPath ] , in context: UpdateContext < Element > ) {
3434
3535 collectionView. reloadItems ( at: indexPaths)
3636 }
3737
38- open func moveItem( at indexPath: IndexPath , to newIndexPath: IndexPath , in context: UpdateContext < Element > ) {
38+ public func moveItem( at indexPath: IndexPath , to newIndexPath: IndexPath , in context: UpdateContext < Element > ) {
3939
4040 collectionView. moveItem ( at: indexPath, to: newIndexPath)
4141 }
4242
43- open func performBatch( in context: UpdateContext < Element > , animated: Bool , updates: @escaping ( ) -> Void , completion: @escaping ( ) -> Void ) {
43+ public func performBatch( in context: UpdateContext < Element > , animated: Bool , updates: @escaping ( ) -> Void , completion: @escaping ( ) -> Void ) {
4444
4545 if animated {
4646 collectionView. performBatchUpdates ( {
@@ -63,7 +63,7 @@ open class CollectionViewAdapter<Element>: Updating {
6363
6464 }
6565
66- open func reload( completion: @escaping ( ) -> Void ) {
66+ public func reload( completion: @escaping ( ) -> Void ) {
6767
6868 collectionView. reloadData ( )
6969 completion ( )
0 commit comments