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
36b715c7fd
commit
53c279f212
@ -27,7 +27,7 @@ class AlbumDataSource: NSObject, NSCollectionViewDataSource {
|
|||||||
self.albums[indexPath.item].coverArt = image
|
self.albums[indexPath.item].coverArt = image
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
albumViewItem.setAlbum(self.albums[indexPath.item])
|
collectionView.reloadItems(at: [indexPath])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user