Modify cells to show quoted messages.

pull/1/head
Matthew Chen 8 years ago
parent 5824cbd2a8
commit 324afb1152

@ -396,8 +396,8 @@ CG_INLINE CGSize CGSizeCeil(CGSize size)
CGFloat trailingMargin = self.quotedBubbleTrailingMargin; CGFloat trailingMargin = self.quotedBubbleTrailingMargin;
[self.viewConstraints addObjectsFromArray:@[ [self.viewConstraints addObjectsFromArray:@[
[quotedMessageView autoPinLeadingToSuperviewWithMargin:leadingMargin], [quotedMessageView autoPinLeadingToSuperviewMarginWithInset:leadingMargin],
[quotedMessageView autoPinTrailingToSuperviewWithMargin:trailingMargin], [quotedMessageView autoPinTrailingToSuperviewMarginWithInset:trailingMargin],
]]; ]];
if (lastSubview) { if (lastSubview) {
@ -882,7 +882,7 @@ CG_INLINE CGSize CGSizeCeil(CGSize size)
quoteStripView.userInteractionEnabled = NO; quoteStripView.userInteractionEnabled = NO;
[quotedMessageView addSubview:quoteStripView]; [quotedMessageView addSubview:quoteStripView];
[quoteStripView autoPinHeightToSuperview]; [quoteStripView autoPinHeightToSuperview];
[quoteStripView autoPinLeadingToSuperview]; [quoteStripView autoPinLeadingToSuperviewMargin];
[quoteStripView autoSetDimension:ALDimensionWidth toSize:self.quotedReplyStripeThickness]; [quoteStripView autoSetDimension:ALDimensionWidth toSize:self.quotedReplyStripeThickness];
UIView *_Nullable quotedThumbnailView = nil; UIView *_Nullable quotedThumbnailView = nil;
@ -892,8 +892,8 @@ CG_INLINE CGSize CGSizeCeil(CGSize size)
quotedThumbnailView.userInteractionEnabled = NO; quotedThumbnailView.userInteractionEnabled = NO;
quotedThumbnailView.backgroundColor = [UIColor redColor]; quotedThumbnailView.backgroundColor = [UIColor redColor];
[quotedMessageView addSubview:quotedThumbnailView]; [quotedMessageView addSubview:quotedThumbnailView];
[quotedThumbnailView autoPinTopToSuperview]; [quotedThumbnailView autoPinTopToSuperviewMargin];
[quotedThumbnailView autoPinTrailingToSuperview]; [quotedThumbnailView autoPinTrailingToSuperviewMargin];
[quotedThumbnailView autoSetDimension:ALDimensionWidth toSize:self.quotedThumbnailSize]; [quotedThumbnailView autoSetDimension:ALDimensionWidth toSize:self.quotedThumbnailSize];
[quotedThumbnailView autoSetDimension:ALDimensionHeight toSize:self.quotedThumbnailSize]; [quotedThumbnailView autoSetDimension:ALDimensionHeight toSize:self.quotedThumbnailSize];
} }
@ -910,11 +910,11 @@ CG_INLINE CGSize CGSizeCeil(CGSize size)
quotedAuthorLabel.lineBreakMode = NSLineBreakByTruncatingTail; quotedAuthorLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[quotedMessageView addSubview:quotedAuthorLabel]; [quotedMessageView addSubview:quotedAuthorLabel];
[quotedAuthorLabel autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:self.quotedContentTopInset]; [quotedAuthorLabel autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:self.quotedContentTopInset];
[quotedAuthorLabel autoPinLeadingToView:quoteStripView margin:self.quotedReplyStripeHSpacing]; [quotedAuthorLabel autoPinLeadingToTrailingEdgeOfView:quoteStripView offset:self.quotedReplyStripeHSpacing];
if (quotedThumbnailView) { if (quotedThumbnailView) {
[quotedAuthorLabel autoPinTrailingToView:quotedThumbnailView margin:self.quotedThumbnailHSpacing]; [quotedAuthorLabel autoPinTrailingToEdgeOfView:quotedThumbnailView offset:self.quotedThumbnailHSpacing];
} else { } else {
[quotedAuthorLabel autoPinTrailingToSuperviewWithMargin:self.quotedContentTrailingMargin]; [quotedAuthorLabel autoPinTrailingToSuperviewMarginWithInset:self.quotedContentTrailingMargin];
} }
if (self.hasQuotedText) { if (self.hasQuotedText) {
@ -925,13 +925,13 @@ CG_INLINE CGSize CGSizeCeil(CGSize size)
toEdge:ALEdgeBottom toEdge:ALEdgeBottom
ofView:quotedAuthorLabel ofView:quotedAuthorLabel
withOffset:self.quotedAuthorBottomSpacing]; withOffset:self.quotedAuthorBottomSpacing];
[quotedTextView autoPinLeadingToView:quoteStripView margin:self.quotedReplyStripeHSpacing]; [quotedTextView autoPinLeadingToTrailingEdgeOfView:quoteStripView offset:self.quotedReplyStripeHSpacing];
if (quotedThumbnailView) { if (quotedThumbnailView) {
[quotedTextView autoPinTrailingToView:quotedThumbnailView margin:self.quotedThumbnailHSpacing]; [quotedTextView autoPinLeadingToTrailingEdgeOfView:quotedThumbnailView offset:self.quotedThumbnailHSpacing];
} else { } else {
[quotedTextView autoPinTrailingToSuperviewWithMargin:self.quotedContentTrailingMargin]; [quotedTextView autoPinTrailingToSuperviewMarginWithInset:self.quotedContentTrailingMargin];
} }
[quotedTextView autoPinBottomToSuperviewWithMargin:self.quotedContentBottomInset]; [quotedTextView autoPinBottomToSuperviewMarginWithInset:self.quotedContentBottomInset];
} }
return quotedMessageView; return quotedMessageView;

@ -2496,6 +2496,7 @@ isQuotedMessageAttachmentDownloaded:(BOOL)isQuotedMessageAttachmentDownloaded
[actions addObjectsFromArray:[self allFakeMediaActions:thread includeLabels:includeLabels]]; [actions addObjectsFromArray:[self allFakeMediaActions:thread includeLabels:includeLabels]];
[actions addObjectsFromArray:[self allFakeTextActions:thread includeLabels:includeLabels]]; [actions addObjectsFromArray:[self allFakeTextActions:thread includeLabels:includeLabels]];
[actions addObjectsFromArray:[self allFakeSequenceActions:thread includeLabels:includeLabels]]; [actions addObjectsFromArray:[self allFakeSequenceActions:thread includeLabels:includeLabels]];
[actions addObjectsFromArray:[self allFakeQuotedReplyActions:thread includeLabels:includeLabels]];
return actions; return actions;
} }

Loading…
Cancel
Save