strvcom / ios-chat-component

Chat modular library
MIT License
1 stars 1 forks source link

Add ability to load messages after/before specified message #85

Closed danpecher closed 3 years ago

danpecher commented 3 years ago

Added new method:

getMessages(conversation id: EntityIdentifier, request: MessagesRequest, completion: @escaping (Result<[MessageUI], ChatError>) -> Void)

that allows to load messages after or before specified message to be able to jump in history inside a chat. This way we don't listen to changes to loaded messages, we simply return them.

I introduced a new enum LoadingDirection and struct MessagesRequest for this purpose.