ChatKit icon indicating copy to clipboard operation
ChatKit copied to clipboard

Scroll position of MessagesList

Open jasonatcobi opened this issue 6 years ago • 3 comments

Hi all

When showing a MessageList, is it possible to scroll to the top of the first unread message? I've noticed that when the message is long enough to take up more than the screen, the scroll position seems to be set to the bottom of the message.

I'm not sure if this is a bug or a missing setting or working as intended or that I've made a mistake in implementation.

I have a webview inside the message view, not sure if you think that is relevant or not.

jasonatcobi avatar Oct 30 '17 09:10 jasonatcobi

please give any information about this

anuragkp26 avatar Mar 09 '21 07:03 anuragkp26

When showing a MessageList, is it possible to scroll to the top of the first unread message?

anuragkp26 avatar Mar 09 '21 07:03 anuragkp26

This can be archieved as stated here https://github.com/stfalcon-studio/ChatKit/issues/211#issuecomment-428955733
The model does not store any information about a read status, so you have to handle it on your own.
Then filter MessageListAdapater.items for the position of the first unread message and use recyclerviews messageList.scrollToPosition

Hatzen avatar Aug 27 '23 19:08 Hatzen