Fixes compiler warnings related to the widget

This commit is contained in:
Stuart Breckenridge
2023-02-06 16:25:58 +08:00
parent 3b8686ca4d
commit 9d4690b130
4 changed files with 4 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ public final class WidgetDataEncoder {
@available(iOS 14, *)
private func encodeWidgetData(completion: @escaping (WidgetData?) -> Void) {
var dispatchGroup = DispatchGroup()
let dispatchGroup = DispatchGroup()
var groupError: Error? = nil
var unread = [LatestArticle]()

View File

@@ -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],

View File

@@ -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],

View File

@@ -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],