diff options
| author | Fuwn <[email protected]> | 2025-09-09 02:45:27 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-09 02:45:27 -0700 |
| commit | f5744c78f3790cae8e1905b4b0e37fc8aad176c3 (patch) | |
| tree | edfeb32d2c56cd909a7eb7895240d7f46d4563d1 /Sora/Views/Post/Grid/PostGridView.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-f5744c78f3790cae8e1905b4b0e37fc8aad176c3.tar.xz sora-testing-f5744c78f3790cae8e1905b4b0e37fc8aad176c3.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 1a55079..978a237 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -321,8 +321,14 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length } #endif + #if os(macOS) + let placement = ToolbarItemPlacement.navigation + #else + let placement = ToolbarItemPlacement.topBarLeading + #endif + if initialTag == nil { - PlatformSpecificToolbarItem(placement: .navigationBarLeading) { + PlatformSpecificToolbarItem(placement: placement) { Menu { ForEach( Array(manager.searchHistory.enumerated().filter { $0.offset < manager.historyIndex }), @@ -345,7 +351,7 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length .id("previousSearchMenu") } - PlatformSpecificToolbarItem(placement: .navigationBarLeading) { + PlatformSpecificToolbarItem(placement: placement) { Menu { ForEach( Array(manager.searchHistory.enumerated().filter { $0.offset > manager.historyIndex }), |