summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-21 05:15:43 -0700
committerFuwn <[email protected]>2025-06-21 05:15:43 -0700
commit5eeb59e6287a33297ed49ad9ef5a9f3a26cb2aa7 (patch)
tree8a5987bba1ab60a92b366cc149a488e2ab0b217c
parentfeat: Development commit (diff)
downloadsora-testing-5eeb59e6287a33297ed49ad9ef5a9f3a26cb2aa7.tar.xz
sora-testing-5eeb59e6287a33297ed49ad9ef5a9f3a26cb2aa7.zip
feat: Development commit
-rw-r--r--Sora/Views/Post/Details/PostDetailsView.swift21
1 files changed, 17 insertions, 4 deletions
diff --git a/Sora/Views/Post/Details/PostDetailsView.swift b/Sora/Views/Post/Details/PostDetailsView.swift
index 920c51b..637fff4 100644
--- a/Sora/Views/Post/Details/PostDetailsView.swift
+++ b/Sora/Views/Post/Details/PostDetailsView.swift
@@ -117,10 +117,23 @@ struct PostDetailsView: View {
}
}
) {
- PostDetailsTagsView(isPresented: $isTagsSheetPresented, tags: post.tags)
- #if os(macOS)
- .frame(minHeight: (NSScreen.main?.frame.height ?? 1_080) / 2, maxHeight: .infinity)
- #endif
+ if #available(macOS 15.0, *) {
+ tagsSheetContent()
+ .presentationSizing(.page)
+ } else {
+ tagsSheetContent()
+ }
}
}
+
+ @ViewBuilder
+ private func tagsSheetContent() -> some View {
+ PostDetailsTagsView(isPresented: $isTagsSheetPresented, tags: post.tags)
+ #if os(macOS)
+ .frame(
+ minHeight: (NSScreen.main?.frame.height ?? 1_080) / 2,
+ maxHeight: .infinity
+ )
+ #endif
+ }
}