Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 92332c2b69
commit 99b76b9734

@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithContactShare:(ContactShareViewModel *)contactShare
delegate:(id<OWSContactShareButtonsViewDelegate>)delegate;
- (void)createContents;
+ (CGFloat)bubbleHeight;
// Returns YES IFF the tap was handled.

@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
_delegate = delegate;
_contactShare = contactShare;
_contactsManager = [Environment current].contactsManager;
[self createContents];
}
return self;
@ -116,7 +118,8 @@ NS_ASSUME_NONNULL_BEGIN
UILabel *label = [UILabel new];
self.buttonView = label;
if ([OWSContactShareButtonsView hasSendTextButton:self.contactShare contactsManager:self.contactsManager]) {
label.text = NSLocalizedString(@"ACTION_SEND_MESSAGE", @"Label for 'sent message' button in contact view.");
label.text
= NSLocalizedString(@"ACTION_SEND_MESSAGE", @"Label for button that lets you send a message to a contact.");
} else if ([OWSContactShareButtonsView hasInviteButton:self.contactShare contactsManager:self.contactsManager]) {
label.text = NSLocalizedString(@"ACTION_INVITE", @"Label for 'invite' button in contact view.");
} else if ([OWSContactShareButtonsView hasAddToContactsButton:self.contactShare]) {

@ -506,7 +506,6 @@ NS_ASSUME_NONNULL_BEGIN
OWSContactShareButtonsView *buttonsView =
[[OWSContactShareButtonsView alloc] initWithContactShare:self.viewItem.contactShare delegate:self];
[buttonsView createContents];
NSValue *_Nullable actionButtonsSize = [self actionButtonsSize];
OWSAssert(actionButtonsSize);
@ -514,15 +513,14 @@ NS_ASSUME_NONNULL_BEGIN
[buttonsView autoSetDimension:ALDimensionHeight toSize:actionButtonsSize.CGSizeValue.height],
]];
// The "body media" view casts a shadow "downward" onto adjacent views,
// The "contact share" view casts a shadow "downward" onto adjacent views,
// so we use a "proxy" view to take its place within the v-stack
// view and then insert the body media view above its proxy so that
// view and then insert the "contact share" view above its proxy so that
// it floats above the other content of the bubble view.
UIView *proxyView = [UIView new];
[self.stackView addArrangedSubview:proxyView];
// TODO: We may only end up using a single shadow.
OWSBubbleShapeView *shadowView = [OWSBubbleShapeView bubbleShadowView];
OWSBubbleShapeView *clipView = [OWSBubbleShapeView bubbleClipView];
@ -542,7 +540,7 @@ NS_ASSUME_NONNULL_BEGIN
shadowView.fillColor = buttonsView.backgroundColor;
shadowView.layer.shadowColor = [UIColor blackColor].CGColor;
shadowView.layer.shadowOpacity = 0.12f;
shadowView.layer.shadowOffset = CGSizeMake(0.f, 0.f);
shadowView.layer.shadowOffset = CGSizeZero;
shadowView.layer.shadowRadius = 1.f;
}

Loading…
Cancel
Save