Make attributed titles work on iOS

This commit is contained in:
Nate Weaver
2020-04-15 16:34:16 -05:00
parent dc787620c5
commit 6aff83481f
4 changed files with 65 additions and 21 deletions

View File

@@ -12,6 +12,7 @@ import Articles
struct MasterTimelineCellData {
let title: String
let attributedTitle: NSAttributedString
let summary: String
let dateString: String
let feedName: String
@@ -28,6 +29,7 @@ struct MasterTimelineCellData {
init(article: Article, showFeedName: ShowFeedName, feedName: String?, byline: String?, iconImage: IconImage?, showIcon: Bool, featuredImage: UIImage?, numberOfLines: Int, iconSize: IconSize) {
self.title = ArticleStringFormatter.truncatedTitle(article)
self.attributedTitle = ArticleStringFormatter.attributedTruncatedTitle(article)
self.summary = ArticleStringFormatter.truncatedSummary(article)
self.dateString = ArticleStringFormatter.dateString(article.logicalDatePublished)
@@ -60,6 +62,7 @@ struct MasterTimelineCellData {
init() { //Empty
self.title = ""
self.attributedTitle = NSAttributedString()
self.summary = ""
self.dateString = ""
self.feedName = ""