iOS | message browser
What is proper way to retrieve chat messages? Right now im using following code, thats working fine until you edit single message multiple time, lets say edited message count = messagePerPage. That in results you will get only single message. (API return 20x same message with replacement ID, so in final user see only one message until nextPage() method is not initiated...)
What is correct procedure to retrieve unique 20 messagesPerPage on init() ?
messageBrowser = serviceManager.conversationsManagerService.messagesBrowser(for: conversation, withPageSize: messagesPerPage, preloadMessages: true)
messageBrowser!.reset()
messageBrowser!.delegate = self
messageBrowser!.resyncBrowsingCache { (addedCacheItems : Optional<Array<Any>>, removedCacheItems : Optional<Array<Any>>, updatedCacheItems : Optional<Array<Any>>, error : Optional<Error>) in
NSLog("CKItemsBrowser resyncDone")
}
Please sign in to leave a comment.
Comments
0 comments