mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix lint issues.
This commit is contained in:
@@ -82,4 +82,3 @@ struct ArticleItemView: View {
|
||||
return displayFormatter.string(from: date)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SizeCategories {
|
||||
|
||||
|
||||
let largeSizeCategories: [ContentSizeCategory] = [.extraExtraLarge,
|
||||
.extraExtraExtraLarge,
|
||||
.accessibilityMedium,
|
||||
@@ -17,10 +17,9 @@ struct SizeCategories {
|
||||
.accessibilityExtraLarge,
|
||||
.accessibilityExtraExtraLarge,
|
||||
.accessibilityExtraExtraExtraLarge]
|
||||
|
||||
|
||||
|
||||
func isSizeCategoryLarge(category: ContentSizeCategory) -> Bool {
|
||||
largeSizeCategories.filter{ $0 == category }.count == 1
|
||||
largeSizeCategories.filter { $0 == category }.count == 1
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
struct StarredWidgetView : View {
|
||||
struct StarredWidgetView: View {
|
||||
|
||||
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||
@Environment(\.sizeCategory) var sizeCategory: ContentSizeCategory
|
||||
@@ -20,12 +20,11 @@ struct StarredWidgetView : View {
|
||||
if entry.widgetData.starredArticles.count == 0 {
|
||||
inboxZero
|
||||
.widgetURL(WidgetDeepLink.starred.url)
|
||||
}
|
||||
else {
|
||||
GeometryReader { metrics in
|
||||
} else {
|
||||
GeometryReader { _ in
|
||||
starredImage
|
||||
.frame(width: WidgetLayout.titleImageSize, alignment: .leading)
|
||||
VStack(alignment:.leading, spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
ForEach(0..<maxCount(), id: \.self, content: { i in
|
||||
if i != 0 {
|
||||
Divider()
|
||||
@@ -94,7 +93,6 @@ struct StarredWidgetView : View {
|
||||
.frame(width: 30)
|
||||
.foregroundColor(.yellow)
|
||||
|
||||
|
||||
Text(L10n.starredWidgetNoItemsTitle)
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
struct TodayWidgetView : View {
|
||||
struct TodayWidgetView: View {
|
||||
|
||||
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||
@Environment(\.sizeCategory) var sizeCategory: ContentSizeCategory
|
||||
@@ -20,12 +20,11 @@ struct TodayWidgetView : View {
|
||||
if entry.widgetData.todayArticles.count == 0 {
|
||||
inboxZero
|
||||
.widgetURL(WidgetDeepLink.today.url)
|
||||
}
|
||||
else {
|
||||
GeometryReader { metrics in
|
||||
} else {
|
||||
GeometryReader { _ in
|
||||
todayImage
|
||||
.frame(width: WidgetLayout.titleImageSize, alignment: .leading)
|
||||
VStack(alignment:.leading, spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
ForEach(0..<maxCount(), id: \.self, content: { i in
|
||||
if i != 0 {
|
||||
Divider()
|
||||
@@ -93,7 +92,6 @@ struct TodayWidgetView : View {
|
||||
.frame(width: 30)
|
||||
.foregroundColor(.orange)
|
||||
|
||||
|
||||
Text(L10n.todayWidgetNoItemsTitle)
|
||||
.font(.headline)
|
||||
.foregroundColor(.primary)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
struct UnreadWidgetView : View {
|
||||
struct UnreadWidgetView: View {
|
||||
|
||||
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||
@Environment(\.sizeCategory) var sizeCategory: ContentSizeCategory
|
||||
@@ -20,12 +20,11 @@ struct UnreadWidgetView : View {
|
||||
if entry.widgetData.currentUnreadCount == 0 {
|
||||
inboxZero
|
||||
.widgetURL(WidgetDeepLink.unread.url)
|
||||
}
|
||||
else {
|
||||
GeometryReader { metrics in
|
||||
} else {
|
||||
GeometryReader { _ in
|
||||
unreadImage
|
||||
.frame(width: WidgetLayout.titleImageSize, alignment: .leading)
|
||||
VStack(alignment:.leading, spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
ForEach(0..<maxCount(), id: \.self, content: { i in
|
||||
if i != 0 {
|
||||
Divider()
|
||||
@@ -105,4 +104,3 @@ struct UnreadWidgetView : View {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user