- (id <OTRMessageProtocol,JSQMessageData>)messageAtIndexPath:(NSIndexPath *)indexPath
{
// Multiple invocations with the same indexPath tend to come in groups, no need to hit the DB each time.
// Even though the object is cached, the row ID calculation still takes time
if (![indexPath isEqual:self.currentIndexPath]) {
self.currentIndexPath = indexPath;
self.currentMessage = [self.viewHandler object:indexPath];
}
return self.currentMessage;
}
this method returns the message based on indexpath. How can I get the message from yapdatabase by passing messageID instead of indexpath?
In OTRMessageViewController
this method returns the message based on indexpath. How can I get the message from yapdatabase by passing messageID instead of indexpath?