|
|
|
@ -115,16 +115,6 @@ class SessionAvatarCell: UITableViewCell {
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|