🩹 Fix #4727 by adding sort order

This commit is contained in:
Stuart Breckenridge committed 2025-08-19 19:43:46 +08:00
1 parent 0050146577
commit 61a2901921
1 file changed
+3 -3
+3 -3
View File
@@ -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)
}