From 11e6e0ec638bfe18c7c973dcdd44b4eefe8b0d79 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 15 Jun 2025 01:19:33 -0700 Subject: feat: Development commit --- Sora/Views/Post/Grid/PostGridView.swift | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 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 39cd7da..6d40c7e 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -127,23 +127,23 @@ struct PostGridView: View { #endif #if !os(macOS) - ToolbarItem(placement: .secondaryAction) { + PlatformSpecificToolbarItem { Button(action: { Task { isSearchHistoryPresented.toggle() } }) { Label("Search History", systemImage: "clock.arrow.circlepath") } } - if manager.isLoading || manager.isNavigatingHistory { + if #available(iOS 26, *), manager.isLoading || manager.isNavigatingHistory { ToolbarItem(placement: .status) { ProgressView() } } #endif - PlatformSpecificToolbarItem(placement: .secondaryAction) { + PlatformSpecificToolbarItem { PostGridBookmarkButtonView() .disabled(manager.tags.isEmpty) } - PlatformSpecificToolbarItem(placement: .secondaryAction) { + PlatformSpecificToolbarItem { Button(action: { Task { manager.loadNextPage() } }) { Label( "Manually Load Next Page", @@ -153,6 +153,12 @@ struct PostGridView: View { .disabled(manager.isLoading || manager.endOfData) } + #if !os(macOS) + if #unavailable(iOS 26), manager.isLoading || manager.isNavigatingHistory { + ToolbarItem(placement: .topBarTrailing) { ProgressView() } + } + #endif + PlatformSpecificToolbarItem(placement: .navigation) { Button(action: { manager.goBackInHistory() }) { Label("Previous Search", systemImage: "chevron.left") -- cgit v1.2.3