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:
parent
b91cb50f4e
commit
4ff0ff6e9b
@ -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])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user