]> Untitled Git - lemmy.git/commitdiff
Adding post listing separators. Hiding full score unless downvotes.
authorDessalines <tyhou13@gmx.com>
Fri, 6 Mar 2020 16:51:25 +0000 (11:51 -0500)
committerDessalines <tyhou13@gmx.com>
Fri, 6 Mar 2020 16:51:25 +0000 (11:51 -0500)
ui/src/components/post-listing.tsx

index bfa58a739d0c3d9c1b2458e41081df7bc685c7c3..2d09e90e58bfc00926a9e70a01bf76553c4e2148 100644 (file)
@@ -463,27 +463,34 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                     </span>
                   )}
                 </li>
+                <li className="list-inline-item">•</li>
                 <li className="list-inline-item">
                   <span>
                     <MomentTime data={post} />
                   </span>
                 </li>
-                <li className="list-inline-item">
-                  <span className="text-muted">
-                    <svg class="small icon icon-inline mr-1">
-                      <use xlinkHref="#icon-arrow-up"></use>
-                    </svg>
-                    {this.state.upvotes}
-                  </span>
-                </li>
-                <li className="list-inline-item">
-                  <span className="text-muted">
-                    <svg class="small icon icon-inline mr-1">
-                      <use xlinkHref="#icon-arrow-down"></use>
-                    </svg>
-                    {this.state.downvotes}
-                  </span>
-                </li>
+                <li className="list-inline-item">•</li>
+                {this.state.upvotes !== this.state.score && (
+                  <>
+                    <li className="list-inline-item">
+                      <span className="text-muted">
+                        <svg class="small icon icon-inline mr-1">
+                          <use xlinkHref="#icon-arrow-up"></use>
+                        </svg>
+                        {this.state.upvotes}
+                      </span>
+                    </li>
+                    <li className="list-inline-item">
+                      <span className="text-muted">
+                        <svg class="small icon icon-inline mr-1">
+                          <use xlinkHref="#icon-arrow-down"></use>
+                        </svg>
+                        {this.state.downvotes}
+                      </span>
+                    </li>
+                    <li className="list-inline-item">•</li>
+                  </>
+                )}
                 <li className="list-inline-item">
                   <Link
                     className="text-muted"