mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Add led presence in Avatar view
This commit is contained in:
parent
46af917c6e
commit
b927680689
1 changed files with 3 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ class Avatar : UIView {
|
|||
|
||||
let initialsLabel: StyledLabel
|
||||
let iconImageView = UIImageView()
|
||||
let iconPresenceView = UIImageView(image: UIImage(named:"led_connected"))
|
||||
|
||||
init (color:LightDarkColor,textStyle:TextStyle) {
|
||||
initialsLabel = StyledLabel(textStyle)
|
||||
|
|
@ -43,9 +44,11 @@ class Avatar : UIView {
|
|||
self.backgroundColor = color.get()
|
||||
addSubview(initialsLabel)
|
||||
addSubview(iconImageView)
|
||||
addSubview(iconPresenceView)
|
||||
iconImageView.backgroundColor = .white
|
||||
initialsLabel.matchParentSideBorders().matchParentHeight().done()
|
||||
iconImageView.matchParentDimmensions().done()
|
||||
iconPresenceView.alignParentRight().alignParentBottom().done()
|
||||
UIDeviceBridge.displayModeSwitched.observe { _ in
|
||||
self.initialsLabel.applyStyle(textStyle)
|
||||
self.backgroundColor = color.get()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue