|
@@ -91,6 +91,9 @@ extension PublishMusicListController : UITableViewDelegate, UITableViewDataSourc
|
|
cell.musicItemMdl = musicItemMdlArr[indexPath.row]
|
|
cell.musicItemMdl = musicItemMdlArr[indexPath.row]
|
|
cell.useClickClosure = {
|
|
cell.useClickClosure = {
|
|
[weak self] in
|
|
[weak self] in
|
|
|
|
+ let curChoosingId = self?.musicItemMdlArr[indexPath.row].id!
|
|
|
|
+ MusicPlayManager.shared().curPlayingId = curChoosingId ?? 0
|
|
|
|
+
|
|
let musicUrlStr = self?.musicItemMdlArr[indexPath.row].url
|
|
let musicUrlStr = self?.musicItemMdlArr[indexPath.row].url
|
|
if let chooseMusicClosure = self?.chooseMusicClosure {
|
|
if let chooseMusicClosure = self?.chooseMusicClosure {
|
|
chooseMusicClosure(musicUrlStr ?? "")
|
|
chooseMusicClosure(musicUrlStr ?? "")
|
|
@@ -107,11 +110,8 @@ extension PublishMusicListController : UITableViewDelegate, UITableViewDataSourc
|
|
|
|
|
|
let musicId = musicItemMdlArr[indexPath.row].id!
|
|
let musicId = musicItemMdlArr[indexPath.row].id!
|
|
MusicPlayManager.shared().curPlayingId = musicId
|
|
MusicPlayManager.shared().curPlayingId = musicId
|
|
-// resetPlayingStatusWithout(musicId)
|
|
|
|
-
|
|
|
|
-// let curChoosingId = MusicPlayManager.shared().curChoosingId
|
|
|
|
-// self.resetPlayingStatusWithout(curPlayingId)
|
|
|
|
-// self.resetCellStatusWith(curPlayingId, curChoosingId)
|
|
|
|
|
|
+ let curChoosingId = MusicPlayManager.shared().curPlayingId
|
|
|
|
+ self.resetCellStatusWith(musicId, curChoosingId)
|
|
}
|
|
}
|
|
|
|
|
|
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
|
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|