Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 196d82c17a
commit d40f74dd0b

@ -74,7 +74,6 @@ NS_ASSUME_NONNULL_BEGIN
buttonStackView.spacing = self.vSpacing;
// Ensure all of the buttons have the same width.
buttonStackView.alignment = UIStackViewAlignmentFill;
buttonStackView.layoutMargins = UIEdgeInsetsZero;
self.stackView = [[UIStackView alloc] initWithArrangedSubviews:@[
self.titleLabel,
@ -83,7 +82,6 @@ NS_ASSUME_NONNULL_BEGIN
self.stackView.axis = UILayoutConstraintAxisVertical;
self.stackView.spacing = self.vSpacing;
self.stackView.alignment = UIStackViewAlignmentCenter;
self.stackView.layoutMargins = UIEdgeInsetsZero;
[self.contentView addSubview:self.stackView];
}

@ -925,7 +925,7 @@ NS_ASSUME_NONNULL_BEGIN
mediaHeight *= factor;
}
return CGSizeRound(CGSizeMake(mediaWidth, mediaHeight));
result = CGSizeRound(CGSizeMake(mediaWidth, mediaHeight));
break;
}
case OWSMessageCellType_Audio:

@ -66,7 +66,6 @@ NS_ASSUME_NONNULL_BEGIN
self.stackView.axis = UILayoutConstraintAxisHorizontal;
self.stackView.spacing = self.hSpacing;
self.stackView.alignment = UIStackViewAlignmentCenter;
self.stackView.layoutMargins = UIEdgeInsetsZero;
[self.contentView addSubview:self.stackView];
UITapGestureRecognizer *tap =

@ -260,7 +260,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
return measurementCell;
}
- (CGFloat)vSpacingWithLastLayoutItem:(id<ConversationViewLayoutItem>)lastLayoutItem
- (CGFloat)vSpacingWithPreviousLayoutItem:(id<ConversationViewLayoutItem>)lastLayoutItem
{
OWSAssert(lastLayoutItem);

@ -21,7 +21,7 @@ typedef NS_ENUM(NSInteger, ConversationViewLayoutAlignment) {
- (ConversationViewLayoutAlignment)layoutAlignment;
- (CGFloat)vSpacingWithLastLayoutItem:(id<ConversationViewLayoutItem>)lastLayoutItem;
- (CGFloat)vSpacingWithPreviousLayoutItem:(id<ConversationViewLayoutItem>)lastLayoutItem;
@end

@ -102,10 +102,10 @@ NS_ASSUME_NONNULL_BEGIN
CGFloat contentBottom = y;
NSInteger row = 0;
id<ConversationViewLayoutItem> _Nullable lastLayoutItem = nil;
id<ConversationViewLayoutItem> _Nullable previousLayoutItem = nil;
for (id<ConversationViewLayoutItem> layoutItem in layoutItems) {
if (lastLayoutItem) {
y += [layoutItem vSpacingWithLastLayoutItem:lastLayoutItem];
if (previousLayoutItem) {
y += [layoutItem vSpacingWithPreviousLayoutItem:previousLayoutItem];
}
CGSize layoutSize = CGSizeCeil([layoutItem cellSize]);
@ -126,7 +126,7 @@ NS_ASSUME_NONNULL_BEGIN
contentBottom = itemFrame.origin.y + itemFrame.size.height;
y = contentBottom;
row++;
lastLayoutItem = layoutItem;
previousLayoutItem = layoutItem;
}
contentBottom += self.layoutInfo.contentMarginBottom;

@ -74,6 +74,8 @@ class MessageDetailViewController: OWSViewController, MediaGalleryDataSourceDele
self.uiDatabaseConnection.beginLongLivedReadTransaction()
updateDBConnectionAndMessageToLatest()
self.conversationLayoutInfo.viewWidth = view.width()
self.navigationItem.title = NSLocalizedString("MESSAGE_METADATA_VIEW_TITLE",
comment: "Title for the 'message metadata' view.")

Loading…
Cancel
Save