Compare commits
2 Commits
bc9a700383
...
98bb230817
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 98bb230817 | |
Shadowfacts | 3d6d9b2a91 |
|
@ -109,10 +109,20 @@ class ContentTextView: LinkTextView, BaseEmojiLabel {
|
|||
case "p":
|
||||
attributed.append(NSAttributedString(string: "\n\n"))
|
||||
case "em", "i":
|
||||
let currentFont: UIFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? self.font!
|
||||
let currentFont: UIFont
|
||||
if attributed.length == 0 {
|
||||
currentFont = defaultFont
|
||||
} else {
|
||||
currentFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? defaultFont
|
||||
}
|
||||
attributed.addAttribute(.font, value: currentFont.withTraits(.traitItalic)!, range: attributed.fullRange)
|
||||
case "strong", "b":
|
||||
let currentFont: UIFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? self.font!
|
||||
let currentFont: UIFont
|
||||
if attributed.length == 0 {
|
||||
currentFont = defaultFont
|
||||
} else {
|
||||
currentFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? defaultFont
|
||||
}
|
||||
attributed.addAttribute(.font, value: currentFont.withTraits(.traitBold)!, range: attributed.fullRange)
|
||||
case "del":
|
||||
attributed.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: attributed.fullRange)
|
||||
|
|
|
@ -146,7 +146,9 @@ class TimelineStatusTableViewCell: BaseStatusTableViewCell {
|
|||
verticalStackToActionsContainerConstraint.isActive = false
|
||||
} else {
|
||||
actionsContainerView.isHidden = false
|
||||
actionsContainerHeightConstraint.isActive = true
|
||||
// sometimes this constraint is nil for reasons i can't discern
|
||||
// not re-activating in that case doesn't seem to make a difference
|
||||
actionsContainerHeightConstraint?.isActive = true
|
||||
verticalStackToSuperviewConstraint.isActive = false
|
||||
verticalStackToActionsContainerConstraint.isActive = true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue