File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,23 @@ struct PostView: View {
3535 @State private var isPresentingCommentsSheet : Bool = false
3636
3737 var body : some View {
38+ Group {
39+ if isStandalone {
40+ postContent
41+ } else {
42+ NavigationLink ( value: Route . post ( id: post. id) ) {
43+ postContent
44+ }
45+ . buttonStyle ( . plain)
46+ }
47+ }
48+ . sheet ( isPresented: $isPresentingCommentsSheet) {
49+ CommentsView ( postId: post. post. postId, postManager: postManager)
50+ . postHogScreenView ( )
51+ }
52+ }
53+
54+ private var postContent : some View {
3855 VStack {
3956 Divider ( )
4057 . padding ( . bottom, 4 )
@@ -65,10 +82,6 @@ struct PostView: View {
6582 . contentShape ( Rectangle ( ) )
6683 . animation ( . easeInOut( duration: 0.3 ) , value: post. isPinned)
6784 . safeAreaPadding ( . horizontal, 16 )
68- . sheet ( isPresented: $isPresentingCommentsSheet) {
69- CommentsView ( postId: post. post. postId, postManager: postManager)
70- . postHogScreenView ( )
71- }
7285 }
7386
7487 private var authorHeader : some View {
You can’t perform that action at this time.
0 commit comments