From cd62bb58e1f32ddcccaac081dd9aec12c3edc398 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 18 Feb 2026 10:46:38 -0800 Subject: Fix SwiftLint violations --- Sora/Views/Post/Grid/PostGridView.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Sora/Views/Post/Grid/PostGridView.swift') diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 7cfa206..7c0a1aa 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -181,7 +181,7 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length ) #endif .searchSuggestions { - if settings.searchSuggestionsMode != .disabled && isSearchablePresented { + if settings.searchSuggestionsMode != .disabled, isSearchablePresented { SearchSuggestionsView( items: searchSuggestionsItems(), searchText: searchText, @@ -273,7 +273,7 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length } } } else { - if manager.posts.isEmpty && !manager.isNavigatingHistory && !manager.isLoading { + if manager.posts.isEmpty, !manager.isNavigatingHistory, !manager.isLoading { Task(priority: .userInitiated) { await manager.fetchPosts(page: 1, tags: manager.tags, replace: true) } @@ -445,7 +445,7 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length DragGesture() .onEnded { value in if initialTag == nil { - if value.startLocation.x < 50 && value.translation.width > 100 { + if value.startLocation.x < 50, value.translation.width > 100 { withAnimation { manager.goBackInHistory() } @@ -453,8 +453,8 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length debugPrint("ContentView: Swipe left, \(manager.searchHistory)") } - if value.startLocation.x > (UIScreen.main.bounds.width - 50) - && value.translation.width < -100 + if value.startLocation.x > (UIScreen.main.bounds.width - 50), + value.translation.width < -100 { withAnimation { manager.goForwardInHistory() -- cgit v1.2.3