mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +05:30
Update CommentsAdapter.kt
This commit is contained in:
parent
034df8932c
commit
4152f91932
@ -14,8 +14,8 @@ import com.squareup.picasso.Picasso
|
||||
class CommentsAdapter(private val comments: MutableList<Comment>): RecyclerView.Adapter<ViewHolder>(){
|
||||
|
||||
fun updateItems(newItems: List<Comment>){
|
||||
comments.addAll(newItems)
|
||||
var commentsSize = comments.size
|
||||
comments.addAll(newItems)
|
||||
notifyItemRangeInserted(commentsSize, newItems.size)
|
||||
}
|
||||
|
||||
@ -50,4 +50,4 @@ class CommentsAdapter(private val comments: MutableList<Comment>): RecyclerView
|
||||
class ViewHolder(val v: View): RecyclerView.ViewHolder(v){
|
||||
init {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user