reduces encoded article count

This commit is contained in:
Stuart Breckenridge 2020-11-29 17:38:17 +08:00
parent 9206463e46
commit 9f989ac07b
No known key found for this signature in database
GPG Key ID: 1F11FD62007DC331

View File

@ -32,7 +32,7 @@ struct WidgetDataEncoder {
feedIcon: article.iconImage()?.image.dataRepresentation(), feedIcon: article.iconImage()?.image.dataRepresentation(),
pubDate: article.datePublished!.description) pubDate: article.datePublished!.description)
unread.append(latestArticle) unread.append(latestArticle)
if unread.count == 8 { break } if unread.count == 7 { break }
} }
// Starred Articles // Starred Articles
@ -46,7 +46,7 @@ struct WidgetDataEncoder {
feedIcon: article.iconImage()?.image.dataRepresentation(), feedIcon: article.iconImage()?.image.dataRepresentation(),
pubDate: article.datePublished!.description) pubDate: article.datePublished!.description)
starred.append(latestArticle) starred.append(latestArticle)
if starred.count == 8 { break } if starred.count == 7 { break }
} }
// Today Articles // Today Articles
@ -60,7 +60,7 @@ struct WidgetDataEncoder {
feedIcon: article.iconImage()?.image.dataRepresentation(), feedIcon: article.iconImage()?.image.dataRepresentation(),
pubDate: article.datePublished!.description) pubDate: article.datePublished!.description)
today.append(latestArticle) today.append(latestArticle)
if today.count == 8 { break } if today.count == 7 { break }
} }
let latestData = WidgetData(currentUnreadCount: SmartFeedsController.shared.unreadFeed.unreadCount, let latestData = WidgetData(currentUnreadCount: SmartFeedsController.shared.unreadFeed.unreadCount,