From 89412cbe90bfbae1c839e50f8b126df6ad96879d Mon Sep 17 00:00:00 2001 From: Liang Yesheng Date: Thu, 18 Nov 2021 19:09:16 +0800 Subject: [PATCH] Some enhancement --- .../View/Hierarchy/Hollow/Content/HollowContentView.swift | 6 ++++++ .../Hierarchy/Hollow/Detail/HollowDetailSubViews.swift | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/Hollow/View/Hierarchy/Hollow/Content/HollowContentView.swift b/Source/Hollow/View/Hierarchy/Hollow/Content/HollowContentView.swift index 16f429b3..d899bc93 100644 --- a/Source/Hollow/View/Hierarchy/Hollow/Content/HollowContentView.swift +++ b/Source/Hollow/View/Hierarchy/Hollow/Content/HollowContentView.swift @@ -156,6 +156,12 @@ struct HollowContentView: View { view } else { Menu { + Button { + UIPasteboard.general.string = postDataWrapper.post.text + } label: { + Label("COMMENT_VIEW_COPY_TEXT_LABEL", systemImage: "doc.on.doc") + } + HyperlinkMenuContent(links: links, citations: citations) } label: { view } } diff --git a/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailSubViews.swift b/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailSubViews.swift index 5977363c..314a1597 100644 --- a/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailSubViews.swift +++ b/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailSubViews.swift @@ -51,7 +51,7 @@ extension HollowDetailView { .padding(.trailing, 6) } - Button(action: { withAnimation { reverseComments.toggle() }}) { + Button(action: { reverseComments.toggle() }) { HStack(spacing: 5) { Text(reverseComments ? "HOLLOWDETAIL_COMMENTS_ORDER_NEW_TO_OLD" : "HOLLOWDETAIL_COMMENTS_ORDER_OLD_TO_NEW") Image(systemName: "arrow.up") @@ -59,6 +59,7 @@ extension HollowDetailView { } .dynamicFont(size: 15, weight: .medium) .foregroundColor(.hollowCardStarUnselected) + .animation(.defaultSpring, value: reverseComments) } } .padding(.horizontal) @@ -72,8 +73,9 @@ extension HollowDetailView { .id(comment.commentId) } - if store.isLoading, postData.replyNumber > postData.comments.count { - ForEach(0.. 0 { + ForEach(0..