콘텐츠 상세
- 새로고침시 구매자의 데이터가 계속 추가되는 버그 수정
This commit is contained in:
		| @@ -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() } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user