summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid
diff options
context:
space:
mode:
Diffstat (limited to 'Sora/Views/Post/Grid')
-rw-r--r--Sora/Views/Post/Grid/PostGridView.swift32
1 files changed, 13 insertions, 19 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift
index 9e8edd6..5f8611a 100644
--- a/Sora/Views/Post/Grid/PostGridView.swift
+++ b/Sora/Views/Post/Grid/PostGridView.swift
@@ -22,25 +22,19 @@ struct PostGridView: View {
}
WaterfallGrid(filteredPosts, id: \.id) { post in
- Group {
- #if os(macOS)
- Button {
- manager.selectedPost = post
- } label: {
- PostGridThumbnailView(
- post: post,
- posts: filteredPosts
- )
- }
- .buttonStyle(PlainButtonStyle())
- #else
- NavigationLink(value: post) {
- PostGridThumbnailView(
- post: post,
- posts: filteredPosts
- )
- }
- #endif
+ Button {
+ manager.selectedPost = post
+ } label: {
+ PostGridThumbnailView(
+ post: post,
+ posts: filteredPosts
+ )
+ }
+ .buttonStyle(PlainButtonStyle())
+ .contextMenu {
+ Button(action: { manager.selectedPost = post }) {
+ Label("Select Post", systemImage: "arrow.right.circle")
+ }
}
}
.gridStyle(columns: settings.columns)