| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@property (nonatomic, nullable) OWSBubbleStrokeView *boundsStrokeView;
 | 
					 | 
					 | 
					 | 
					@property (nonatomic, nullable) OWSBubbleStrokeView *boundsStrokeView;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@property (nonatomic, readonly) BOOL isForPreview;
 | 
					 | 
					 | 
					 | 
					@property (nonatomic, readonly) BOOL isForPreview;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					@property (nonatomic, readonly) BOOL isOutgoing;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@end
 | 
					 | 
					 | 
					 | 
					@end
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -33,12 +34,14 @@ NS_ASSUME_NONNULL_BEGIN
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					+ (OWSQuotedMessageView *)quotedMessageViewForConversation:(OWSQuotedReplyModel *)quotedMessage
 | 
					 | 
					 | 
					 | 
					+ (OWSQuotedMessageView *)quotedMessageViewForConversation:(OWSQuotedReplyModel *)quotedMessage
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                     displayableQuotedText:(nullable DisplayableText *)displayableQuotedText
 | 
					 | 
					 | 
					 | 
					                                     displayableQuotedText:(nullable DisplayableText *)displayableQuotedText
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                                isOutgoing:(BOOL)isOutgoing
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					{
 | 
					 | 
					 | 
					 | 
					{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    OWSAssert(quotedMessage);
 | 
					 | 
					 | 
					 | 
					    OWSAssert(quotedMessage);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return [[OWSQuotedMessageView alloc] initWithQuotedMessage:quotedMessage
 | 
					 | 
					 | 
					 | 
					    return [[OWSQuotedMessageView alloc] initWithQuotedMessage:quotedMessage
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                         displayableQuotedText:displayableQuotedText
 | 
					 | 
					 | 
					 | 
					                                         displayableQuotedText:displayableQuotedText
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                  isForPreview:NO];
 | 
					 | 
					 | 
					 | 
					                                                  isForPreview:NO
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                                    isOutgoing:isOutgoing];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					+ (OWSQuotedMessageView *)quotedMessageViewForPreview:(OWSQuotedReplyModel *)quotedMessage
 | 
					 | 
					 | 
					 | 
					+ (OWSQuotedMessageView *)quotedMessageViewForPreview:(OWSQuotedReplyModel *)quotedMessage
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -52,12 +55,14 @@ NS_ASSUME_NONNULL_BEGIN
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return [[OWSQuotedMessageView alloc] initWithQuotedMessage:quotedMessage
 | 
					 | 
					 | 
					 | 
					    return [[OWSQuotedMessageView alloc] initWithQuotedMessage:quotedMessage
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                         displayableQuotedText:displayableQuotedText
 | 
					 | 
					 | 
					 | 
					                                         displayableQuotedText:displayableQuotedText
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                  isForPreview:YES];
 | 
					 | 
					 | 
					 | 
					                                                  isForPreview:YES
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                                    isOutgoing:YES];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					- (instancetype)initWithQuotedMessage:(OWSQuotedReplyModel *)quotedMessage
 | 
					 | 
					 | 
					 | 
					- (instancetype)initWithQuotedMessage:(OWSQuotedReplyModel *)quotedMessage
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                displayableQuotedText:(nullable DisplayableText *)displayableQuotedText
 | 
					 | 
					 | 
					 | 
					                displayableQuotedText:(nullable DisplayableText *)displayableQuotedText
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                         isForPreview:(BOOL)isForPreview
 | 
					 | 
					 | 
					 | 
					                         isForPreview:(BOOL)isForPreview
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                           isOutgoing:(BOOL)isOutgoing
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					{
 | 
					 | 
					 | 
					 | 
					{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    self = [super init];
 | 
					 | 
					 | 
					 | 
					    self = [super init];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -70,6 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _quotedMessage = quotedMessage;
 | 
					 | 
					 | 
					 | 
					    _quotedMessage = quotedMessage;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _displayableQuotedText = displayableQuotedText;
 | 
					 | 
					 | 
					 | 
					    _displayableQuotedText = displayableQuotedText;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _isForPreview = isForPreview;
 | 
					 | 
					 | 
					 | 
					    _isForPreview = isForPreview;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    _isOutgoing = isOutgoing;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    [self createContents];
 | 
					 | 
					 | 
					 | 
					    [self createContents];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -91,10 +97,9 @@ NS_ASSUME_NONNULL_BEGIN
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					- (UIColor *)highlightColor
 | 
					 | 
					 | 
					 | 
					- (UIColor *)highlightColor
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					{
 | 
					 | 
					 | 
					 | 
					{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    BOOL isIncomingQuote
 | 
					 | 
					 | 
					 | 
					    BOOL isQuotingSelf = [NSObject isNullableObject:self.quotedMessage.authorId equalTo:TSAccountManager.localNumber];
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        = ![NSObject isNullableObject:self.quotedMessage.authorId equalTo:TSAccountManager.localNumber];
 | 
					 | 
					 | 
					 | 
					    return (isQuotingSelf ? OWSMessagesBubbleImageFactory.bubbleColorOutgoingSent
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return (isIncomingQuote ? OWSMessagesBubbleImageFactory.bubbleColorIncoming
 | 
					 | 
					 | 
					 | 
					                          : OWSMessagesBubbleImageFactory.bubbleColorIncoming);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            : OWSMessagesBubbleImageFactory.bubbleColorOutgoingSent);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#pragma mark -
 | 
					 | 
					 | 
					 | 
					#pragma mark -
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -305,8 +310,14 @@ NS_ASSUME_NONNULL_BEGIN
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    NSString *_Nullable localNumber = [TSAccountManager localNumber];
 | 
					 | 
					 | 
					 | 
					    NSString *_Nullable localNumber = [TSAccountManager localNumber];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    NSString *quotedAuthorText;
 | 
					 | 
					 | 
					 | 
					    NSString *quotedAuthorText;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if ([localNumber isEqualToString:self.quotedMessage.authorId]) {
 | 
					 | 
					 | 
					 | 
					    if ([localNumber isEqualToString:self.quotedMessage.authorId]) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        quotedAuthorText = NSLocalizedString(
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @"QUOTED_REPLY_AUTHOR_INDICATOR_YOURSELF", @"Indicates the author of a quoted message is yourself.");
 | 
					 | 
					 | 
					 | 
					        if (self.isOutgoing) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            quotedAuthorText = NSLocalizedString(
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                @"QUOTED_REPLY_AUTHOR_INDICATOR_YOURSELF", @"message header label when quoting yourself");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            quotedAuthorText = NSLocalizedString(
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                @"QUOTED_REPLY_AUTHOR_INDICATOR_YOU", @"message header label when someone else is quoting you");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } else {
 | 
					 | 
					 | 
					 | 
					    } else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        OWSContactsManager *contactsManager = Environment.current.contactsManager;
 | 
					 | 
					 | 
					 | 
					        OWSContactsManager *contactsManager = Environment.current.contactsManager;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        NSString *quotedAuthor = [contactsManager displayNameForPhoneIdentifier:self.quotedMessage.authorId];
 | 
					 | 
					 | 
					 | 
					        NSString *quotedAuthor = [contactsManager displayNameForPhoneIdentifier:self.quotedMessage.authorId];
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |