Retweak date and unread messages breaks.

pull/1/head
Matthew Chen 7 years ago
parent 4cedce2635
commit b92fc89986

@ -17,7 +17,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic) OWSMessageBubbleView *messageBubbleView;
@property (nonatomic) UIStackView *dateHeaderView;
@property (nonatomic) UIView *dateStrokeView;
@property (nonatomic) UILabel *dateHeaderLabel;
@property (nonatomic) AvatarImageView *avatarView;
@property (nonatomic, nullable) UIImageView *sendFailureBadgeView;
@ -54,18 +53,12 @@ NS_ASSUME_NONNULL_BEGIN
self.messageBubbleView = [OWSMessageBubbleView new];
[self.contentView addSubview:self.messageBubbleView];
self.dateStrokeView = [UIView new];
self.dateStrokeView.backgroundColor = [UIColor ows_light45Color];
[self.dateStrokeView autoSetDimension:ALDimensionHeight toSize:self.dateHeaderStrokeThickness];
[self.dateStrokeView setContentHuggingHigh];
self.dateHeaderLabel = [UILabel new];
self.dateHeaderLabel.font = self.dateHeaderFont;
self.dateHeaderLabel.textAlignment = NSTextAlignmentCenter;
self.dateHeaderLabel.textColor = [UIColor ows_light60Color];
self.dateHeaderView = [[UIStackView alloc] initWithArrangedSubviews:@[
self.dateStrokeView,
self.dateHeaderLabel,
]];
self.dateHeaderView.axis = NSTextLayoutOrientationVertical;
@ -302,8 +295,10 @@ NS_ASSUME_NONNULL_BEGIN
[self.contentView addSubview:self.dateHeaderView];
[self.viewConstraints addObjectsFromArray:@[
[self.dateHeaderView autoPinLeadingToSuperviewMarginWithInset:self.conversationStyle.gutterLeading],
[self.dateHeaderView autoPinTrailingToSuperviewMarginWithInset:self.conversationStyle.gutterTrailing],
[self.dateHeaderView
autoPinLeadingToSuperviewMarginWithInset:self.conversationStyle.fullWidthGutterLeading],
[self.dateHeaderView
autoPinTrailingToSuperviewMarginWithInset:self.conversationStyle.fullWidthGutterTrailing],
[self.dateHeaderView autoPinEdgeToSuperviewEdge:ALEdgeTop],
// DO NOT pin to the bottom of dateHeaderView.

@ -46,8 +46,9 @@ NS_ASSUME_NONNULL_BEGIN
self.contentView.layoutMargins = UIEdgeInsetsZero;
self.strokeView = [UIView new];
self.strokeView.backgroundColor = [UIColor ows_light60Color];
self.strokeView.backgroundColor = [UIColor ows_darkSkyBlueColor];
[self.strokeView autoSetDimension:ALDimensionHeight toSize:self.strokeThickness];
self.strokeView.layer.cornerRadius = self.strokeThickness * 0.5f;
[self.strokeView setContentHuggingHigh];
self.titleLabel = [UILabel new];
@ -67,6 +68,7 @@ NS_ASSUME_NONNULL_BEGIN
self.subtitleLabel,
]];
self.stackView.axis = NSTextLayoutOrientationVertical;
self.stackView.spacing = 2;
[self.contentView addSubview:self.stackView];
[self configureFonts];
@ -130,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN
- (CGFloat)strokeThickness
{
return CGHairlineWidth();
return 4.f;
}
- (CGSize)cellSizeWithTransaction:(YapDatabaseReadTransaction *)transaction

@ -86,8 +86,8 @@ public class ConversationStyle: NSObject {
gutterLeading = 16
gutterTrailing = 20
}
fullWidthGutterLeading = gutterLeading
fullWidthGutterTrailing = gutterTrailing
fullWidthGutterLeading = 16
fullWidthGutterTrailing = 16
errorGutterTrailing = 16
contentWidth = viewWidth - (gutterLeading + gutterTrailing)

Loading…
Cancel
Save