I have the following code -
dashboardViewModel.getChatReadersForMessageId(it.messageId).observe(this@ConversationActivity, Observer { readersCount ->
if (readersCount == groupMembers.size) {
it.messageWasReadByAllMembers = true
conversationAdapter.notifyItemChanged(messagesList.indexOf(it))
}
})
The issue is that messageWasReadByAllMembers
effects a single ImageView inside the viewholder, causing an unnecessary re-rendering of the entire VH rather then that single imageview
How do I re-render only specific elements?