summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid/PostGridView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-09-09 02:45:27 -0700
committerFuwn <[email protected]>2025-09-09 02:45:27 -0700
commitf5744c78f3790cae8e1905b4b0e37fc8aad176c3 (patch)
treeedfeb32d2c56cd909a7eb7895240d7f46d4563d1 /Sora/Views/Post/Grid/PostGridView.swift
parentfeat: Development commit (diff)
downloadsora-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.swift10
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 }),