Removed datePublished force unwrap

This commit is contained in:
Maurice Parker 2021-02-24 16:00:01 -06:00
parent bb99e6f69c
commit 53e0354f93
1 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ public final class WidgetDataEncoder {
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
articleSummary: article.summary,
feedIcon: article.iconImage()?.image.dataRepresentation(),
pubDate: article.datePublished!.description)
pubDate: article.datePublished?.description ?? "")
unread.append(latestArticle)
if unread.count == 7 { break }
}
@ -58,7 +58,7 @@ public final class WidgetDataEncoder {
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
articleSummary: article.summary,
feedIcon: article.iconImage()?.image.dataRepresentation(),
pubDate: article.datePublished!.description)
pubDate: article.datePublished?.description ?? "")
starred.append(latestArticle)
if starred.count == 7 { break }
}
@ -69,7 +69,7 @@ public final class WidgetDataEncoder {
articleTitle: ArticleStringFormatter.truncatedTitle(article).isEmpty ? ArticleStringFormatter.truncatedSummary(article) : ArticleStringFormatter.truncatedTitle(article),
articleSummary: article.summary,
feedIcon: article.iconImage()?.image.dataRepresentation(),
pubDate: article.datePublished!.description)
pubDate: article.datePublished?.description ?? "")
today.append(latestArticle)
if today.count == 7 { break }
}