|
@@ -65,7 +65,6 @@ class MyMusicDialog : BaseXDFragment<DialogMyMusicBinding>() {
|
|
val data = DBHelper.getMusicModel()?.loadAll()
|
|
val data = DBHelper.getMusicModel()?.loadAll()
|
|
if (!data.isNullOrEmpty()){
|
|
if (!data.isNullOrEmpty()){
|
|
music_binding.clAdd.visibility = View.VISIBLE
|
|
music_binding.clAdd.visibility = View.VISIBLE
|
|
- music_binding.clNoContent.visibility = View.GONE
|
|
|
|
data.forEachIndexed { index, item ->
|
|
data.forEachIndexed { index, item ->
|
|
if (musicModel != null && item.id == musicModel?.id){
|
|
if (musicModel != null && item.id == musicModel?.id){
|
|
data[index].setIsPlaying(true)
|
|
data[index].setIsPlaying(true)
|
|
@@ -77,7 +76,6 @@ class MyMusicDialog : BaseXDFragment<DialogMyMusicBinding>() {
|
|
adapter.setNewData(musicList)
|
|
adapter.setNewData(musicList)
|
|
} else {
|
|
} else {
|
|
music_binding.clAdd.visibility = View.GONE
|
|
music_binding.clAdd.visibility = View.GONE
|
|
- music_binding.clNoContent.visibility = View.VISIBLE
|
|
|
|
}
|
|
}
|
|
music_binding.clAdd.setOnClickListener {
|
|
music_binding.clAdd.setOnClickListener {
|
|
isLocalCome = true
|
|
isLocalCome = true
|
|
@@ -85,12 +83,6 @@ class MyMusicDialog : BaseXDFragment<DialogMyMusicBinding>() {
|
|
.build(ARouteConstant.Room.musicList)
|
|
.build(ARouteConstant.Room.musicList)
|
|
.navigation()
|
|
.navigation()
|
|
}
|
|
}
|
|
- music_binding.clNoContent.setOnClickListener {
|
|
|
|
- isLocalCome = true
|
|
|
|
- ARouter.getInstance()
|
|
|
|
- .build(ARouteConstant.Room.musicList)
|
|
|
|
- .navigation()
|
|
|
|
- }
|
|
|
|
|
|
|
|
adapter.setOnItemChildClickListener { _, view, position ->
|
|
adapter.setOnItemChildClickListener { _, view, position ->
|
|
when(view?.id){
|
|
when(view?.id){
|
|
@@ -104,7 +96,6 @@ class MyMusicDialog : BaseXDFragment<DialogMyMusicBinding>() {
|
|
AgoraManager.getRtcEngine()?.stopAudioMixing()
|
|
AgoraManager.getRtcEngine()?.stopAudioMixing()
|
|
if (adapter.data.isEmpty()){
|
|
if (adapter.data.isEmpty()){
|
|
music_binding.clAdd.visibility = View.GONE
|
|
music_binding.clAdd.visibility = View.GONE
|
|
- music_binding.clNoContent.visibility = View.VISIBLE
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}.show(childFragmentManager,"ChoiceDialogFragment")
|
|
}.show(childFragmentManager,"ChoiceDialogFragment")
|
|
@@ -148,7 +139,6 @@ class MyMusicDialog : BaseXDFragment<DialogMyMusicBinding>() {
|
|
val data = DBHelper.getMusicModel()?.loadAll()
|
|
val data = DBHelper.getMusicModel()?.loadAll()
|
|
if (!data.isNullOrEmpty()){
|
|
if (!data.isNullOrEmpty()){
|
|
binding.clAdd.visibility = View.VISIBLE
|
|
binding.clAdd.visibility = View.VISIBLE
|
|
- binding.clNoContent.visibility = View.GONE
|
|
|
|
musicList.clear()
|
|
musicList.clear()
|
|
data.forEachIndexed { index, item ->
|
|
data.forEachIndexed { index, item ->
|
|
if (musicModel != null && item.id == musicModel?.id){
|
|
if (musicModel != null && item.id == musicModel?.id){
|
|
@@ -161,7 +151,6 @@ class MyMusicDialog : BaseXDFragment<DialogMyMusicBinding>() {
|
|
adapter.setNewData(musicList)
|
|
adapter.setNewData(musicList)
|
|
} else {
|
|
} else {
|
|
binding.clAdd.visibility = View.GONE
|
|
binding.clAdd.visibility = View.GONE
|
|
- binding.clNoContent.visibility = View.VISIBLE
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|