1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Use the indexPath version of these methods

This commit is contained in:
Daniel Barber 2019-07-19 17:15:10 -04:00
parent 53b759b723
commit d232acc075
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -14,8 +14,8 @@ extension AlbumViewController: NSCollectionViewDelegate {
collectionView.setDraggingSourceOperationMask(.copy, forLocal: true)
}
func collectionView(_ collectionView: NSCollectionView, pasteboardWriterForItemAt index: Int) -> NSPasteboardWriting? {
let album = dataSource.albums[index]
func collectionView(_ collectionView: NSCollectionView, pasteboardWriterForItemAt indexPath: IndexPath) -> NSPasteboardWriting? {
let album = dataSource.albums[indexPath.item]
return NSPasteboardItem(
draggedAlbum: DraggedAlbum(
@ -26,7 +26,7 @@ extension AlbumViewController: NSCollectionViewDelegate {
)
}
func collectionView(_ collectionView: NSCollectionView, canDragItemsAt indexes: IndexSet, with event: NSEvent) -> Bool {
func collectionView(_ collectionView: NSCollectionView, canDragItemsAt indexPaths: Set<IndexPath>, with event: NSEvent) -> Bool {
return true
}
}