diff --git a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt index 31c076eb7..bdd0f0811 100644 --- a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt @@ -14,8 +14,8 @@ import com.squareup.picasso.Picasso class CommentsAdapter(private val comments: MutableList): RecyclerView.Adapter(){ fun updateItems(newItems: List){ - comments.addAll(newItems) var commentsSize = comments.size + comments.addAll(newItems) notifyItemRangeInserted(commentsSize, newItems.size) } @@ -50,4 +50,4 @@ class CommentsAdapter(private val comments: MutableList): RecyclerView class ViewHolder(val v: View): RecyclerView.ViewHolder(v){ init { } -} \ No newline at end of file +}