dash_chat icon indicating copy to clipboard operation
dash_chat copied to clipboard

[Bug] Problem with the last message

Open fatkullinalina opened this issue 4 years ago • 5 comments

Hi, I'm not sure that it is a bug. I have 2 problems 1.When I type a letter, list with messages scrolls and I don't see the last message. 2.When I close the chat ant then open again, I don't see the last message too. These cases happen only when I have a lot of messages. I attached pictures. first second

third fourth

fatkullinalina avatar Aug 17 '20 13:08 fatkullinalina

Hi @fatkullinalina, well, this is hard to help without knowing your code, this is your responsibility to handle how you send the messages to your backend, dash chat will simply show the messages your are passing it with the 'messages' param. If you have a project or a code snippet to share it'll be easier to help you, I personally never had an issue like that.

SebastienBtr avatar Aug 17 '20 21:08 SebastienBtr

I am also facing the same issue. I think its not about how messages are sent to backend or retrieved. This is happening when the number of retrieved messages are high and when keyboard opens up, automatic scrolling to bottom is not happening.

shanazainab avatar Aug 18 '20 05:08 shanazainab

@shanazainab okay, but there is a difference between not scrolling to bottom and not having the message at all. If the issue is about the scroll to bottom, there is already #53 where you can find some solutions. However we'll not provide a "real" fix as we'll soon start to work on the v2. I'd also suggest to always fetch around 20 messages max and then use loadEarlier to fetch more messages when the user scrolls up, otherwise your chat will not be scalable.

SebastienBtr avatar Aug 18 '20 09:08 SebastienBtr

@fatkullinalina can you confirm that your issue is related to the scroll as described by @shanazainab and in #53 ?

SebastienBtr avatar Aug 18 '20 09:08 SebastienBtr

I had the same problem. Using inverted: true, and building the list of messages in the opposite direction solved this for me.

giaunguyen2176 avatar Aug 27 '21 01:08 giaunguyen2176