fix settings screen
This commit is contained in:
parent
15694aeeb0
commit
ccc517746d
|
@ -114,17 +114,7 @@ class SessionAvatarCell: UITableViewCell {
|
|||
stackView.alignment = .center
|
||||
stackView.distribution = .fillEqually
|
||||
stackView.spacing = (UIDevice.current.isIPad ? Values.iPadButtonSpacing : Values.mediumSpacing)
|
||||
|
||||
if (UIDevice.current.isIPad) {
|
||||
stackView.layoutMargins = UIEdgeInsets(
|
||||
top: 0,
|
||||
left: Values.iPadButtonContainerMargin,
|
||||
bottom: 0,
|
||||
right: Values.iPadButtonContainerMargin
|
||||
)
|
||||
stackView.isLayoutMarginsRelativeArrangement = true
|
||||
}
|
||||
|
||||
|
||||
return stackView
|
||||
}()
|
||||
|
||||
|
@ -242,6 +232,10 @@ class SessionAvatarCell: UITableViewCell {
|
|||
descriptionSeparator.update(title: style.separatorTitle)
|
||||
descriptionSeparator.isHidden = (style.separatorTitle == nil)
|
||||
|
||||
if (UIDevice.current.isIPad) {
|
||||
descriptionActionStackView.addArrangedSubview(UIView.hStretchingSpacer())
|
||||
}
|
||||
|
||||
style.descriptionActions.forEach { action in
|
||||
let result: SessionButton = SessionButton(style: .bordered, size: .medium)
|
||||
result.setTitle(action.title, for: UIControl.State.normal)
|
||||
|
@ -252,6 +246,10 @@ class SessionAvatarCell: UITableViewCell {
|
|||
|
||||
descriptionActionStackView.addArrangedSubview(result)
|
||||
}
|
||||
|
||||
if (UIDevice.current.isIPad) {
|
||||
descriptionActionStackView.addArrangedSubview(UIView.hStretchingSpacer())
|
||||
}
|
||||
descriptionActionStackView.isHidden = style.descriptionActions.isEmpty
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue