Fix crashing bug in Starred widget.

This commit is contained in:
Brent Simmons
2025-01-20 22:48:21 -08:00
parent 743de0e065
commit 4e2fd66c32

View File

@@ -78,10 +78,11 @@ struct StarredWidgetView : View {
reduceAccessibilityCount = 1
}
let starredCount = entry.widgetData.starredArticles.count
if family == .systemLarge {
return entry.widgetData.currentStarredCount >= 7 ? (7 - reduceAccessibilityCount) : entry.widgetData.currentStarredCount
return starredCount >= 7 ? (7 - reduceAccessibilityCount) : starredCount
}
return entry.widgetData.currentStarredCount >= 3 ? (3 - reduceAccessibilityCount) : entry.widgetData.currentStarredCount
return starredCount >= 3 ? (3 - reduceAccessibilityCount) : starredCount
}
var inboxZero: some View {