|
|
|
@ -266,15 +266,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[quotedMessageView autoPinLeadingToSuperviewMarginWithInset:bubbleLeadingMargin],
|
|
|
|
|
[quotedMessageView autoPinTrailingToSuperviewMarginWithInset:bubbleTrailingMargin],
|
|
|
|
|
]];
|
|
|
|
|
// We need constraints to control the vertical sizing of bubble content views, but we use
|
|
|
|
|
// lower priority so that when a message only contains media it uses the exact bounds of
|
|
|
|
|
// the message view.
|
|
|
|
|
[NSLayoutConstraint
|
|
|
|
|
autoSetPriority:UILayoutPriorityDefaultLow
|
|
|
|
|
forConstraints:^{
|
|
|
|
|
[self.viewConstraints addObject:[quotedMessageView autoSetDimension:ALDimensionHeight
|
|
|
|
|
toSize:quotedMessageContentSize.height]];
|
|
|
|
|
}];
|
|
|
|
|
[self.viewConstraints
|
|
|
|
|
addObject:[quotedMessageView autoSetDimension:ALDimensionHeight toSize:quotedMessageContentSize.height]];
|
|
|
|
|
|
|
|
|
|
if (lastSubview) {
|
|
|
|
|
[self.viewConstraints
|
|
|
|
@ -344,7 +337,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[bodyMediaView autoPinLeadingToSuperviewMarginWithInset:0],
|
|
|
|
|
[bodyMediaView autoPinTrailingToSuperviewMarginWithInset:0],
|
|
|
|
|
]];
|
|
|
|
|
// We need constraints to control the vertical sizing of bubble content views, but we use
|
|
|
|
|
// We need constraints to control the vertical sizing of the media view, but we use
|
|
|
|
|
// lower priority so that when a message only contains media it uses the exact bounds of
|
|
|
|
|
// the message view.
|
|
|
|
|
[NSLayoutConstraint
|
|
|
|
@ -391,15 +384,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[bodyTextView autoPinLeadingToSuperviewMarginWithInset:self.textLeadingMargin],
|
|
|
|
|
[bodyTextView autoPinTrailingToSuperviewMarginWithInset:self.textTrailingMargin],
|
|
|
|
|
]];
|
|
|
|
|
// We need constraints to control the vertical sizing of bubble content views, but we use
|
|
|
|
|
// lower priority so that when a message only contains media it uses the exact bounds of
|
|
|
|
|
// the message view.
|
|
|
|
|
[NSLayoutConstraint
|
|
|
|
|
autoSetPriority:UILayoutPriorityDefaultLow
|
|
|
|
|
forConstraints:^{
|
|
|
|
|
[self.viewConstraints
|
|
|
|
|
addObject:[bodyTextView autoSetDimension:ALDimensionHeight toSize:bodyTextContentSize.height]];
|
|
|
|
|
}];
|
|
|
|
|
[self.viewConstraints
|
|
|
|
|
addObject:[bodyTextView autoSetDimension:ALDimensionHeight toSize:bodyTextContentSize.height]];
|
|
|
|
|
|
|
|
|
|
if (lastSubview) {
|
|
|
|
|
[self.viewConstraints addObject:[bodyTextView autoPinEdge:ALEdgeTop
|
|
|
|
|
toEdge:ALEdgeBottom
|
|
|
|
|