|
@@ -158,15 +158,15 @@ class PQStuckPointMusicContentController: PQBaseViewController {
|
|
|
func updateCurrentPlayMusic(isPlaying: Bool, isClearCurrentMusic: Bool) {
|
|
|
if lastIndexPath != nil, itemList.count > (lastIndexPath?.item ?? 0) {
|
|
|
(itemList[lastIndexPath?.item ?? 0] as? PQVoiceModel)?.isPlaying = isPlaying
|
|
|
- collectionView.reloadData()
|
|
|
+ collectionView.reloadItems(at: [lastIndexPath!])
|
|
|
}
|
|
|
if isClearCurrentMusic {
|
|
|
if lastIndexPath != nil, itemList.count > (lastIndexPath?.item ?? 0) {
|
|
|
(itemList[lastIndexPath?.item ?? 0] as? PQVoiceModel)?.isSelected = false
|
|
|
(itemList[lastIndexPath?.item ?? 0] as? PQVoiceModel)?.isPlaying = false
|
|
|
+ collectionView.reloadItems(at: [lastIndexPath!])
|
|
|
}
|
|
|
lastIndexPath = nil
|
|
|
- collectionView.reloadData()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -258,7 +258,7 @@ extension PQStuckPointMusicContentController: UICollectionViewDelegate, UICollec
|
|
|
} else if contentType != .catagery {
|
|
|
(itemList[indexPath.item] as? PQVoiceModel)?.isPlaying = !((itemList[indexPath.item] as? PQVoiceModel)?.isPlaying ?? false)
|
|
|
(itemList[indexPath.item] as? PQVoiceModel)?.isSelected = true
|
|
|
- collectionView.reloadData()
|
|
|
+ collectionView.reloadItems(at: [indexPath])
|
|
|
}
|
|
|
}
|
|
|
if contentType == .catagery {
|