I would like to add some item in current paging data which already contains items. And shown in the list adapter.
I have tried to insertHeaderItem. But, when adding second item. Header is getting replaced by second item. I want to keep all item in the list. and update that list every time when i add new item.
paingData
.insertHeaderItem(item = sampleViewEvents.comment)
.let {
getCommentList.value = it
}
I doesn't want to call an API to refresh the whole list. It can leads a performance issue.
Thanks in advance