ChatSecure-iOS icon indicating copy to clipboard operation
ChatSecure-iOS copied to clipboard

Get message from messageID

Open ShahrukhMalik opened this issue 5 years ago • 0 comments

In OTRMessageViewController

 - (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?

ShahrukhMalik avatar Jul 02 '20 15:07 ShahrukhMalik