diff --git a/Shared/Widget/WidgetDataEncoder.swift b/Shared/Widget/WidgetDataEncoder.swift index e2ed90eab..c624e725e 100644 --- a/Shared/Widget/WidgetDataEncoder.swift +++ b/Shared/Widget/WidgetDataEncoder.swift @@ -143,9 +143,9 @@ public final class WidgetDataEncoder { let latestData = WidgetData(currentUnreadCount: SmartFeedsController.shared.unreadFeed.unreadCount, currentTodayCount: SmartFeedsController.shared.todayFeed.unreadCount, currentStarredCount: (try? AccountManager.shared.fetchCountForStarredArticles()) ?? 0, - unreadArticles: unread, - starredArticles: starred, - todayArticles:today, + unreadArticles: unread.sorted(by: { $0.pubDate > $1.pubDate }), + starredArticles: starred.sorted(by: { $0.pubDate > $1.pubDate }), + todayArticles:today.sorted(by: { $0.pubDate > $1.pubDate }), lastUpdateTime: Date()) completion(latestData) } diff --git a/Widget/Widget Views/StarredWidget.swift b/Widget/Widget Views/StarredWidget.swift index 6667e29f1..cd3b3e72d 100644 --- a/Widget/Widget Views/StarredWidget.swift +++ b/Widget/Widget Views/StarredWidget.swift @@ -37,7 +37,7 @@ struct StarredWidgetView : View { Spacer() VStack(alignment:.leading, spacing: 0) { - ForEach(0..