ChatKit icon indicating copy to clipboard operation
ChatKit copied to clipboard

MessageListAdapter addToStart method always add message on top of chat (instead of bottom of list)

Open bipinvaylu opened this issue 5 years ago • 1 comments

Currently, I am using this library. There is no doubt that its nice library. But I am not sure why (probably) for me only addToStart method add new message in top of the list, instead of bottom of the list. addToEnd(msgList, reverse:true) is working fine. Here, I am adding my my app code related to this and related screen shot.

Code

private fun renderSBMessageState(state: SBMessageState) {
        when (state) {
            is SBMessageState.Loaded -> {
                messageListAdapter.addToEnd(state.messageList, true)
                chatConnectionManagerViewModel.getCurrentSBGroupChannel()?.groupChannel?.markAsRead()
            }

            is SBMessageState.OnNewMessage -> {
                messageListAdapter.addToStart(state.message, true)
            }
}

Chat screeshot:

image

@stfalcon Am i missing something here to setting up? Can you please help me here to figure out this.

Thanks

bipinvaylu avatar Apr 15 '21 09:04 bipinvaylu

Up ! Is somebody succeed to figure it out ? I'm struggling with this problem too

Bastosss77 avatar Mar 11 '22 13:03 Bastosss77