From: Dessalines Date: Fri, 16 Jul 2021 17:04:35 +0000 (-0400) Subject: Use better comment collapse icon, and add text. Fixes #318 X-Git-Url: http://these/git/readmes/%24%7B%60data:application/%7B%60%24%7BghostArchiveUrl%7D/static/git-logo.png?a=commitdiff_plain;h=0c45d61eeb16e3f30a3c33c2a89ed85f2de96eb2;p=lemmy-ui.git Use better comment collapse icon, and add text. Fixes #318 --- diff --git a/src/shared/components/comment-node.tsx b/src/shared/components/comment-node.tsx index 0e7db68..33518f8 100644 --- a/src/shared/components/comment-node.tsx +++ b/src/shared/components/comment-node.tsx @@ -193,11 +193,14 @@ export class CommentNode extends Component { {/* This is an expanding spacer for mobile */}
@@ -1232,6 +1235,7 @@ export class CommentNode extends Component { handleCommentCollapse(i: CommentNode) { i.state.collapsed = !i.state.collapsed; i.setState(i.state); + setupTippy(); } handleViewSource(i: CommentNode) { @@ -1270,4 +1274,8 @@ export class CommentNode extends Component { return `${points} • ${upvotes} • ${downvotes}`; } + + get expandText(): string { + return this.state.collapsed ? i18n.t("expand") : i18n.t("collapse"); + } }