|
@@ -27,7 +27,8 @@ public class WebxdcPreview: UIView {
|
|
|
let view = UILabel()
|
|
|
view.font = UIFont.preferredFont(forTextStyle: .body)
|
|
|
view.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- view.numberOfLines = 3
|
|
|
+ view.numberOfLines = 1
|
|
|
+ view.lineBreakMode = .byTruncatingTail
|
|
|
isAccessibilityElement = false
|
|
|
return view
|
|
|
}()
|
|
@@ -69,7 +70,11 @@ public class WebxdcPreview: UIView {
|
|
|
}
|
|
|
}
|
|
|
titleView.text = dict["name"] as? String
|
|
|
- subtitleView.text = dict["summary"] as? String ?? "Webxdc"
|
|
|
+ guard let summary = dict["summary"] as? String, !summary.isEmpty else {
|
|
|
+ subtitleView.text = "Webxdc"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ subtitleView.text = summary
|
|
|
}
|
|
|
|
|
|
public func configureAccessibilityLabel() -> String {
|