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)
|
collectionView.setDraggingSourceOperationMask(.copy, forLocal: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func collectionView(_ collectionView: NSCollectionView, pasteboardWriterForItemAt index: Int) -> NSPasteboardWriting? {
|
func collectionView(_ collectionView: NSCollectionView, pasteboardWriterForItemAt indexPath: IndexPath) -> NSPasteboardWriting? {
|
||||||
let album = dataSource.albums[index]
|
let album = dataSource.albums[indexPath.item]
|
||||||
|
|
||||||
return NSPasteboardItem(
|
return NSPasteboardItem(
|
||||||
draggedAlbum: DraggedAlbum(
|
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
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user