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