Fix ForEach warnings.
This commit is contained in:
parent
3ce2a1c848
commit
5426623e2f
|
@ -37,7 +37,7 @@ struct StarredWidgetView : View {
|
|||
Spacer()
|
||||
|
||||
VStack(alignment:.leading, spacing: 0) {
|
||||
ForEach(0..<maxCount(), content: { i in
|
||||
ForEach(0..<maxCount(), id: \.self, content: { i in
|
||||
if i != 0 {
|
||||
Divider()
|
||||
ArticleItemView(article: entry.widgetData.starredArticles[i],
|
||||
|
|
|
@ -37,7 +37,7 @@ struct TodayWidgetView : View {
|
|||
Spacer()
|
||||
|
||||
VStack(alignment:.leading, spacing: 0) {
|
||||
ForEach(0..<maxCount(), content: { i in
|
||||
ForEach(0..<maxCount(), id: \.self, content: { i in
|
||||
if i != 0 {
|
||||
Divider()
|
||||
ArticleItemView(article: entry.widgetData.todayArticles[i],
|
||||
|
|
|
@ -37,7 +37,7 @@ struct UnreadWidgetView : View {
|
|||
Spacer()
|
||||
|
||||
VStack(alignment:.leading, spacing: 0) {
|
||||
ForEach(0..<maxCount(), content: { i in
|
||||
ForEach(0..<maxCount(), id: \.self, content: { i in
|
||||
if i != 0 {
|
||||
Divider()
|
||||
ArticleItemView(article: entry.widgetData.unreadArticles[i],
|
||||
|
|
Loading…
Reference in New Issue