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