parent
11307eae3b
commit
c0ad98f285
|
@ -53,4 +53,10 @@ class AudioContentBuyerAdapter : RecyclerView.Adapter<AudioContentBuyerAdapter.V
|
|||
items.addAll(buyerList)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun clear() {
|
||||
items.clear()
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
|
|||
}
|
||||
|
||||
if (refresh) {
|
||||
contentBuyerAdapter.clear()
|
||||
viewModel.getAudioContentDetail(audioContentId = audioContentId) { finish() }
|
||||
}
|
||||
}
|
||||
|
@ -170,6 +171,7 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
|
|||
)
|
||||
|
||||
binding.swipeRefreshLayout.setOnRefreshListener {
|
||||
contentBuyerAdapter.clear()
|
||||
viewModel.getAudioContentDetail(
|
||||
audioContentId = audioContentId
|
||||
) { finish() }
|
||||
|
|
Loading…
Reference in New Issue