From 4152f9193200cbe36797988e7e285bf98e094aec Mon Sep 17 00:00:00 2001 From: Bnyro <82752168+Bnyro@users.noreply.github.com> Date: Tue, 10 May 2022 06:23:44 +0200 Subject: [PATCH] Update CommentsAdapter.kt --- .../java/com/github/libretube/adapters/CommentsAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}