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

This is how the collection view should be updated

The way I was doing it before was resulting in reused views getting
updated by the code, which caused albums to appear in the wrong place.
This commit is contained in:
Daniel Barber 2019-03-03 17:26:13 -05:00
parent b91cb50f4e
commit 4ff0ff6e9b
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -27,7 +27,7 @@ class AlbumDataSource: NSObject, NSCollectionViewDataSource {
self.albums[indexPath.item].coverArt = image
DispatchQueue.main.async {
albumViewItem.setAlbum(self.albums[indexPath.item])
collectionView.reloadItems(at: [indexPath])
}
}
}