NicolasConstant / sengi

Mastodon & Pleroma Multi-account Desktop Client
https://nicolasconstant.github.io/sengi/
GNU Affero General Public License v3.0
524 stars 34 forks source link

Thumbnails not displayed when there are more than 4 #616

Open alok0 opened 10 months ago

alok0 commented 10 months ago

If there are posts with more than 4 images (some instances have much higher limits on the number of attachments) no images are displayed at all.

As an initial workaround 4 images should be displayed if there than more than 4

diff --git a/src/app/components/stream/status/attachements/attachements.component.html b/src/app/components/stream/status/attachements/attachements.component.html
--- src/app/components/stream/status/attachements/attachements.component.html
+++ src/app/components/stream/status/attachements/attachements.component.html
@@ -25,9 +25,9 @@
             (openEvent)="attachmentSelected('image', 2)">
         </app-attachement-image>
     </div>

-    <div class="galery__image" *ngIf="imageAttachments.length === 4">
+    <div class="galery__image" *ngIf="imageAttachments.length >= 4">
         <app-attachement-image class="galery__img--4" [attachment]="imageAttachments[0]"
             (openEvent)="attachmentSelected('image', 0)">
         </app-attachement-image>
         <app-attachement-image class="galery__img--4" [attachment]="imageAttachments[1]"

But a real fix should probably also include an indication that there are more thumbnails not shown.