]> Untitled Git - lemmy.git/commitdiff
Fix image expanding and truncation issue.
authorDessalines <tyhou13@gmx.com>
Thu, 16 Jan 2020 03:33:23 +0000 (22:33 -0500)
committerDessalines <tyhou13@gmx.com>
Thu, 16 Jan 2020 03:33:23 +0000 (22:33 -0500)
ui/assets/css/main.css
ui/src/components/post-listing.tsx

index fd29e756a0076cdb8ad7dc7ca9d4c4cc61a0fc97..eb98adc1a9b09e43e972ed8bd822ce9b7900778e 100644 (file)
@@ -157,4 +157,5 @@ hr {
 
 .fl-1 {
   flex: 1;
-}
\ No newline at end of file
+}
+
index 7e7a8852bc6995e60c3c29c0e47027588ffe0488..c945806bdfa305ed5a89fd92ffcf07af2cd16dc7 100644 (file)
@@ -136,18 +136,22 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
             </button>
           )}
         </div>
-        {post.url && isImage(post.url) && !post.nsfw && !post.community_nsfw && (
-          <span
-            title={i18n.t('expand_here')}
-            class="pointer"
-            onClick={linkEvent(this, this.handleImageExpandClick)}
-          >
-            <img
-              class="mx-2 mt-1 float-left img-fluid thumbnail rounded"
-              src={imageThumbnailer(post.url)}
-            />
-          </span>
-        )}
+        {post.url &&
+          isImage(post.url) &&
+          !post.nsfw &&
+          !post.community_nsfw &&
+          !this.state.imageExpanded && (
+            <span
+              title={i18n.t('expand_here')}
+              class="pointer"
+              onClick={linkEvent(this, this.handleImageExpandClick)}
+            >
+              <img
+                class="mx-2 mt-1 float-left img-fluid thumbnail rounded"
+                src={imageThumbnailer(post.url)}
+              />
+            </span>
+          )}
         {post.url && isVideo(post.url) && (
           <video
             playsinline