From 89a73942d3ce63d87d214b0f2d2004055e1066cd Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 25 Feb 2025 17:19:23 -0800 Subject: feat: Development commit --- Sora/Views/ContentView.swift | 12 +++--------- Sora/Views/Post/Grid/PostGridView.swift | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Sora/Views/ContentView.swift b/Sora/Views/ContentView.swift index 5c19f37..b232e18 100644 --- a/Sora/Views/ContentView.swift +++ b/Sora/Views/ContentView.swift @@ -13,9 +13,7 @@ struct ContentView: View { NavigationSplitView { List(selection: $selectedTabIndex) { ForEach(Array(tabs.enumerated()), id: \.offset) { index, element in - NavigationLink(value: index) { - Text(element) - } + NavigationLink(value: index) { Text(element) } } } } content: { @@ -38,9 +36,7 @@ struct ContentView: View { } } #if DEBUG - .onAppear { - tabs.append("Settings") - } + .onAppear { tabs.append("Settings") } #endif #else NavigationStack { @@ -51,9 +47,7 @@ struct ContentView: View { set: { if !$0 { manager.selectedPost = nil } } ) ) { - if let post = manager.selectedPost { - PostDetailsView(post: post) - } + if let post = manager.selectedPost { PostDetailsView(post: post) } } } #endif diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 5f8611a..eb71ee6 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -55,9 +55,7 @@ struct PostGridView: View { } .onChange(of: manager.searchText) { _, _ in if manager.searchText.isEmpty, !isSearching { - Task { - manager.performSearch() - } + Task { manager.performSearch() } } } .toolbar { @@ -92,13 +90,9 @@ struct PostGridView: View { if !manager.tags.isEmpty { #if os(macOS) - ToolbarItem { - PostGridBookmarkButtonView() - } + ToolbarItem { PostGridBookmarkButtonView() } #else - ToolbarItem(placement: .bottomBar) { - PostGridBookmarkButtonView() - } + ToolbarItem(placement: .bottomBar) { PostGridBookmarkButtonView() } #endif } } -- cgit v1.2.3