|
|
|
@ -74,7 +74,7 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|
|
|
|
public override func loadView() {
|
|
|
|
|
|
|
|
|
|
self.view = UIView.container()
|
|
|
|
|
self.view.backgroundColor = UIColor.white
|
|
|
|
|
self.view.backgroundColor = Theme.backgroundColor
|
|
|
|
|
|
|
|
|
|
// Recipient Row
|
|
|
|
|
let recipientRow = createRecipientRow()
|
|
|
|
@ -85,8 +85,8 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|
|
|
|
// Text View
|
|
|
|
|
textView = UITextView()
|
|
|
|
|
textView.delegate = self
|
|
|
|
|
textView.backgroundColor = UIColor.white
|
|
|
|
|
textView.textColor = UIColor.black
|
|
|
|
|
textView.backgroundColor = Theme.backgroundColor
|
|
|
|
|
textView.textColor = Theme.primaryColor
|
|
|
|
|
textView.font = UIFont.ows_dynamicTypeBody
|
|
|
|
|
textView.text = self.initialMessageText
|
|
|
|
|
textView.contentInset = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 0.0)
|
|
|
|
@ -103,7 +103,7 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|
|
|
|
|
|
|
|
|
// Hairline borders should be 1 pixel, not 1 point.
|
|
|
|
|
let borderThickness = 1.0 / UIScreen.main.scale
|
|
|
|
|
let borderColor = UIColor(white: 135 / 255.0, alpha: 1.0)
|
|
|
|
|
let borderColor = Theme.middleGrayColor
|
|
|
|
|
|
|
|
|
|
let topBorder = UIView.container()
|
|
|
|
|
topBorder.backgroundColor = borderColor
|
|
|
|
@ -128,12 +128,12 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|
|
|
|
let toLabel = UILabel()
|
|
|
|
|
toLabel.text = NSLocalizedString("MESSAGE_APPROVAL_RECIPIENT_LABEL",
|
|
|
|
|
comment: "Label for the recipient name in the 'message approval' dialog.")
|
|
|
|
|
toLabel.textColor = UIColor.ows_darkGray
|
|
|
|
|
toLabel.textColor = Theme.secondaryColor
|
|
|
|
|
toLabel.font = font
|
|
|
|
|
recipientRow.addSubview(toLabel)
|
|
|
|
|
|
|
|
|
|
let nameLabel = UILabel()
|
|
|
|
|
nameLabel.textColor = UIColor.black
|
|
|
|
|
nameLabel.textColor = Theme.primaryColor
|
|
|
|
|
nameLabel.font = font
|
|
|
|
|
nameLabel.lineBreakMode = .byTruncatingTail
|
|
|
|
|
recipientRow.addSubview(nameLabel)
|
|
|
|
@ -165,12 +165,12 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nameLabel.attributedText = contactsManager.formattedFullName(forRecipientId: contactThread.contactIdentifier(), font: font)
|
|
|
|
|
nameLabel.textColor = UIColor.black
|
|
|
|
|
nameLabel.textColor = Theme.primaryColor
|
|
|
|
|
|
|
|
|
|
if let profileName = self.profileName(contactThread: contactThread) {
|
|
|
|
|
// If there's a profile name worth showing, add it as a second line below the name.
|
|
|
|
|
let profileNameLabel = UILabel()
|
|
|
|
|
profileNameLabel.textColor = UIColor.ows_darkGray
|
|
|
|
|
profileNameLabel.textColor = Theme.secondaryColor
|
|
|
|
|
profileNameLabel.font = font
|
|
|
|
|
profileNameLabel.text = profileName
|
|
|
|
|
profileNameLabel.lineBreakMode = .byTruncatingTail
|
|
|
|
|