Grouping messages with PagedList from EkoMessageRepository.getMessageCollection()

Hi there :wave:

I am using Amity SDK to send and receive messages in my application, following the guide from the docs site, I added getMessageCollection() to get the messages with built-in paging handled. Unfortunately, I need to display the messages with grouping by date, which means I have to handle adding my custom GroupDateItem to the PagedList, but the PagedList doesn’t have supported operators to do that (It has add methods but the result will be returned as the List). Do you guys have any supported methods to achieve this? Thank you.

Hi @hoang.nguyen92dn thank you for the inquiry and sorry for the late reply.

Due to the limitation of PagedList, an additional item cannot be inserted.
We plan to provide Message list in a form of PagedData, which allow insertion of separators, in upcoming versions.

To achieve this with the current version, we recommend using itemDecoration.
Please see this example, https://stackoverflow.com/a/55415079

Thank you.