mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 02:37:37 +01:00
Trim whitespace from webpage titles in StatusCardControl (#1020)
This commit is contained in:
parent
3369971b7d
commit
ad5070d2b9
@ -138,13 +138,14 @@ public final class StatusCardControl: UIControl {
|
||||
}
|
||||
|
||||
public func configure(card: Card) {
|
||||
let title = card.title.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
if let host = card.url?.host {
|
||||
accessibilityLabel = "\(card.title) \(host)"
|
||||
accessibilityLabel = "\(title) \(host)"
|
||||
} else {
|
||||
accessibilityLabel = card.title
|
||||
accessibilityLabel = title
|
||||
}
|
||||
|
||||
titleLabel.text = card.title
|
||||
titleLabel.text = title
|
||||
linkLabel.text = card.url?.host
|
||||
imageView.contentMode = .center
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user