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:
parent
53b759b723
commit
d232acc075
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user