Fix incoming friend request interaction

pull/14/head
Niels Andriesse 6 years ago
parent dca6aed6ee
commit 635dcef2b2

@ -36,10 +36,10 @@
mainStackView.addArrangedSubview(buttonStackView) mainStackView.addArrangedSubview(buttonStackView)
let buttonFont = UIFont.ows_dynamicTypeBodyClamped.ows_mediumWeight() let buttonFont = UIFont.ows_dynamicTypeBodyClamped.ows_mediumWeight()
let buttonHeight = buttonFont.pointSize * 48 / 17 let buttonHeight = buttonFont.pointSize * 48 / 17
let acceptButton = OWSFlatButton.button(title: NSLocalizedString("Accept", comment: ""), font: buttonFont, titleColor: .ows_materialBlue, backgroundColor: .clear, target: self, selector: #selector(accept)) let acceptButton = OWSFlatButton.button(title: NSLocalizedString("Accept", comment: ""), font: buttonFont, titleColor: .ows_materialBlue, backgroundColor: .white, target: self, selector: #selector(accept))
acceptButton.autoSetDimension(.height, toSize: buttonHeight) acceptButton.autoSetDimension(.height, toSize: buttonHeight)
buttonStackView.addArrangedSubview(acceptButton) buttonStackView.addArrangedSubview(acceptButton)
let declineButton = OWSFlatButton.button(title: NSLocalizedString("Decline", comment: ""), font: buttonFont, titleColor: .ows_destructiveRed, backgroundColor: .clear, target: self, selector: #selector(decline)) let declineButton = OWSFlatButton.button(title: NSLocalizedString("Decline", comment: ""), font: buttonFont, titleColor: .ows_destructiveRed, backgroundColor: .white, target: self, selector: #selector(decline))
declineButton.autoSetDimension(.height, toSize: buttonHeight) declineButton.autoSetDimension(.height, toSize: buttonHeight)
buttonStackView.addArrangedSubview(declineButton) buttonStackView.addArrangedSubview(declineButton)
addSubview(mainStackView) addSubview(mainStackView)

@ -371,7 +371,7 @@ NS_ASSUME_NONNULL_BEGIN
} }
if (self.isIncomingFriendRequest) { if (self.isIncomingFriendRequest) {
cellSize.height += 118; // TODO: Measure dynamically cellSize.height += 98; // TODO: Measure dynamically
} }
cellSize = CGSizeCeil(cellSize); cellSize = CGSizeCeil(cellSize);
@ -452,6 +452,10 @@ NS_ASSUME_NONNULL_BEGIN
{ {
OWSAssertDebug(self.delegate); OWSAssertDebug(self.delegate);
if (self.isIncomingFriendRequest) {
return;
}
if (sender.state != UIGestureRecognizerStateBegan) { if (sender.state != UIGestureRecognizerStateBegan) {
return; return;
} }

Loading…
Cancel
Save