Fix crashing bug in Starred widget.

This commit is contained in:
Brent Simmons
2025-01-20 22:48:21 -08:00
parent 8c14c98664
commit a3443b2f6d

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 {