summaryrefslogtreecommitdiff
path: root/Sora/Views
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-07 07:23:24 -0700
committerFuwn <[email protected]>2025-06-07 07:23:24 -0700
commit78fc6a1563cabb72b0a0268963a966e3893fd209 (patch)
tree38a83d633d19aad57ac4da740a7009f4796753c5 /Sora/Views
parentfeat: Development commit (diff)
downloadsora-testing-78fc6a1563cabb72b0a0268963a966e3893fd209.tar.xz
sora-testing-78fc6a1563cabb72b0a0268963a966e3893fd209.zip
feat: Development commit
Diffstat (limited to 'Sora/Views')
-rw-r--r--Sora/Views/MainView.swift8
-rw-r--r--Sora/Views/Post/Details/PostDetailsView.swift4
2 files changed, 8 insertions, 4 deletions
diff --git a/Sora/Views/MainView.swift b/Sora/Views/MainView.swift
index 44a0a8a..87bc090 100644
--- a/Sora/Views/MainView.swift
+++ b/Sora/Views/MainView.swift
@@ -86,9 +86,11 @@ struct MainView: View {
}
#Preview {
- let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1_920, height: 1_080)
- let heightCoefficient = screenSize.height / 1_080
- let widthCoefficient = screenSize.width / 1_440
+ #if os(macOS)
+ let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1_920, height: 1_080)
+ let heightCoefficient = screenSize.height / 1_080
+ let widthCoefficient = screenSize.width / 1_440
+ #endif
MainView()
.environmentObject(SettingsManager())
diff --git a/Sora/Views/Post/Details/PostDetailsView.swift b/Sora/Views/Post/Details/PostDetailsView.swift
index e040bc3..108f12c 100644
--- a/Sora/Views/Post/Details/PostDetailsView.swift
+++ b/Sora/Views/Post/Details/PostDetailsView.swift
@@ -119,7 +119,9 @@ struct PostDetailsView: View {
}
.sheet(isPresented: $isTagsSheetPresented) {
PostDetailsTagsView(isPresented: $isTagsSheetPresented, tags: post.tags)
- .frame(minHeight: 250)
+ #if os(macOS)
+ .frame(minHeight: (NSScreen.main?.frame.height ?? 1_080) / 2, maxHeight: .infinity)
+ #endif
}
}
}