From 941b7ec1bca991bad910d19d0bff850e909ce002 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 9 Apr 2018 09:51:51 -0400 Subject: [PATCH] clarify method signature // FREEBIE --- .../ViewControllers/ConversationView/ConversationViewItem.h | 1 - .../src/Messages/Interactions/TSQuotedMessage.h | 6 +++--- .../src/Messages/Interactions/TSQuotedMessage.m | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h index 7defbbea1..6389804e4 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.h @@ -48,7 +48,6 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType); @property (nonatomic, readonly) BOOL hasBodyText; -// TODO drive these off of the quotedReply? @property (nonatomic, readonly) BOOL isQuotedReply; @property (nonatomic, readonly) BOOL hasQuotedAttachment; @property (nonatomic, readonly) BOOL hasQuotedText; diff --git a/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.h b/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.h index dfc179173..e8505df2b 100644 --- a/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.h +++ b/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.h @@ -77,13 +77,13 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init NS_UNAVAILABLE; -// used in message manager +// used when receiving quoted messages - (instancetype)initWithTimestamp:(uint64_t)timestamp authorId:(NSString *)authorId body:(NSString *_Nullable)body - quotedAttachmentInfos:(NSArray *)attachmentInfos; + receivedQuotedAttachmentInfos:(NSArray *)attachmentInfos; -// used by OWSAttachmentInfo#buildQuotedMessage +// used when sending quoted messages - (instancetype)initWithTimestamp:(uint64_t)timestamp authorId:(NSString *)authorId body:(NSString *_Nullable)body diff --git a/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.m b/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.m index 7b0492913..a32048e15 100644 --- a/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.m +++ b/SignalServiceKit/src/Messages/Interactions/TSQuotedMessage.m @@ -58,7 +58,7 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithTimestamp:(uint64_t)timestamp authorId:(NSString *)authorId body:(NSString *_Nullable)body - quotedAttachmentInfos:(NSArray *)attachmentInfos + receivedQuotedAttachmentInfos:(NSArray *)attachmentInfos { OWSAssert(timestamp > 0); OWSAssert(authorId.length > 0); @@ -187,7 +187,7 @@ NS_ASSUME_NONNULL_BEGIN return [[TSQuotedMessage alloc] initWithTimestamp:timestamp authorId:authorId body:body - quotedAttachmentInfos:attachmentInfos]; + receivedQuotedAttachmentInfos:attachmentInfos]; } + (nullable TSAttachmentStream *)tryToDeriveLocalThumbnailWithAttachmentInfo:(OWSAttachmentInfo *)attachmentInfo