فهرست منبع

Fix placeholders in photo rail

Zed 4 سال پیش
والد
کامیت
683c052036
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      src/views/profile.nim

+ 4 - 1
src/views/profile.nim

@@ -78,8 +78,11 @@ proc renderPhotoRail(profile: Profile): VNode =
     tdiv(class="photo-rail-grid"):
       for i, photo in profile.photoRail:
         if i == 16: break
+        let photoSuffix =
+          if "format" in photo.url or "placeholder" in photo.url: ""
+          else: ":thumb"
         a(href=(&"/{profile.user.username}/status/{photo.tweetId}#m")):
-          genImg(photo.url & (if "format" in photo.url: "" else: ":thumb"))
+          genImg(photo.url & photoSuffix)
 
 proc renderBanner(banner: string): VNode =
   buildHtml():