Skip to content

Commit 0019ec5

Browse files
committed
Call CollectionViewSectionedDataSource.moveItem in the correct way.
1 parent c2aa45c commit 0019ec5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/DataSources/CollectionViewSectionedDataSource.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,8 @@ public class CollectionViewSectionedDataSource<S: SectionModelType>
204204
}
205205

206206
override func _rx_collectionView(collectionView: UICollectionView, moveItemAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) {
207-
if self.moveItem != nil {
208-
self.moveItem!(self, sourceIndexPath: sourceIndexPath, destinationIndexPath: destinationIndexPath)
209-
} else {
210-
self._sectionModels.moveFromSourceIndexPath(sourceIndexPath, destinationIndexPath: destinationIndexPath)
211-
}
207+
self._sectionModels.moveFromSourceIndexPath(sourceIndexPath, destinationIndexPath: destinationIndexPath)
208+
self.moveItem?(self, sourceIndexPath: sourceIndexPath, destinationIndexPath: destinationIndexPath)
212209
}
213210

214211
}

0 commit comments

Comments
 (0)