Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 6a07599e00
commit 6ee74eaffc

@ -670,9 +670,10 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Find Content #pragma mark - Find Content
+ (nullable TSInteraction *)findInteractionInThreadByTimestamp : (uint64_t)timestamp authorId + (nullable TSInteraction *)findInteractionInThreadByTimestamp:(uint64_t)timestamp
: (NSString *)authorId threadUniqueId : (NSString *)threadUniqueId transaction authorId:(NSString *)authorId
: (YapDatabaseReadTransaction *)transaction; threadUniqueId:(NSString *)threadUniqueId
transaction:(YapDatabaseReadTransaction *)transaction
{ {
OWSAssert(timestamp > 0); OWSAssert(timestamp > 0);
OWSAssert(authorId.length > 0); OWSAssert(authorId.length > 0);
@ -712,9 +713,8 @@ NS_ASSUME_NONNULL_BEGIN
if (interactions.count > 1) { if (interactions.count > 1) {
// In case of collision, take the first. // In case of collision, take the first.
DDLogError(@"%@ more than one matching interaction in thread.", self.logTag); DDLogError(@"%@ more than one matching interaction in thread.", self.logTag);
return nil;
} }
return interactions[0]; return interactions.firstObject;
} }
@end @end

Loading…
Cancel
Save