Skip to content

Commit

Permalink
Some enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
liang2kl committed Nov 18, 2021
1 parent a021640 commit 89412cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ 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")
.rotationEffect(Angle(degrees: reverseComments ? 180 : 0))
}
.dynamicFont(size: 15, weight: .medium)
.foregroundColor(.hollowCardStarUnselected)
.animation(.defaultSpring, value: reverseComments)
}
}
.padding(.horizontal)
Expand All @@ -72,8 +73,9 @@ extension HollowDetailView {
.id(comment.commentId)
}

if store.isLoading, postData.replyNumber > postData.comments.count {
ForEach(0..<postData.replyNumber - postData.comments.count, id: \.self) { _ in
let remainingCommentsCount = postData.replyNumber - postData.comments.count
if store.isLoading, remainingCommentsCount > 0 {
ForEach(0..<min(5, remainingCommentsCount), id: \.self) { _ in
PlaceholderComment()
.padding(.horizontal)
.padding(.top, postData.comments.isEmpty ? 0 : 15)
Expand Down

0 comments on commit 89412cb

Please sign in to comment.