Commit 4a14ce2e authored by Quentin Muret's avatar Quentin Muret Committed by Kateryna Kostiuk

conversation header: user name position

- if the display name doesn't exist, the username is align vertically
 with the avatar

Change-Id: I6d49b893ce9393d2269807a25897ec81c5274ef9
Reviewed-by: Kateryna Kostiuk<kateryna.kostiuk@savoirfairelinux.com>
parent dffa0537
......@@ -284,14 +284,22 @@ class ConversationViewController: UIViewController,
titleView.addSubview(profileImageView)
}
var dnlabelYOffset: CGFloat
var dnlabelYOffset: CGFloat = 0
if UIDevice.current.hasNotch {
if displayName == nil || displayName == "" {
userNameYOffset = 10
} else {
dnlabelYOffset = 4
userNameYOffset = 20
}
} else {
if displayName == nil || displayName == "" {
userNameYOffset = 3
} else {
dnlabelYOffset = -2
userNameYOffset = 12
}
}
if let name = displayName, !name.isEmpty {
let dnlabel: UILabel = UILabel.init(frame: CGRect.init(x: imageSize + infoPadding, y: dnlabelYOffset, width: maxNameLength, height: 20))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment