mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Replace notifyDataSetChanged
This commit is contained in:
parent
dfb32d4b64
commit
2d4e70bd69
@ -16,7 +16,7 @@ class CommentsAdapter(private val comments: MutableList<Comment>): RecyclerView
|
|||||||
|
|
||||||
fun updateItems(newItems: List<Comment>){
|
fun updateItems(newItems: List<Comment>){
|
||||||
comments.addAll(newItems)
|
comments.addAll(newItems)
|
||||||
notifyDataSetChanged()
|
notifyItemRangeInserted(comments.size, newItems.size)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
Loading…
Reference in New Issue
Block a user