Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding message history through addToStart reverses messages' order #361

Open
PvlBlk opened this issue Sep 1, 2021 · 0 comments
Open

Adding message history through addToStart reverses messages' order #361

PvlBlk opened this issue Sep 1, 2021 · 0 comments

Comments

@PvlBlk
Copy link

PvlBlk commented Sep 1, 2021

I'm loading history at the start of user interaction using addToStart method. My messages implement IMessage interface and have createdAt properly set up. Then I put messages into adapter like this:

messagesAdapter?.clear(true)
messagesAdapter?.addToEnd(chatState.data, false)

The end result is the most recent message is displayed at the top with oldest ones displayed at the bottom.
addToEnd(chatState.data, **true**)
Doesn't make a difference
Anyone faced this and can help me? Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant