Skip to content

Commit

Permalink
NT-1914: ux post comment (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunday-okpoluaefe committed Jun 2, 2021
1 parent d99f750 commit f7c7046
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ class CommentsAdapter(private val delegate: Delegate) : KSListAdapter() {
}

fun insertData(comment: CommentCardData, position: Int) {
insertSection(position, listOf(comment))
notifyItemChanged(position)
val list = currentList.toMutableList()
list.add(
position,
comment
)
takeData(list as List<CommentCardData>)
}

override fun viewHolder(@LayoutRes layout: Int, viewGroup: ViewGroup): KSViewHolder {
Expand Down

0 comments on commit f7c7046

Please sign in to comment.