From 7e9257635bc3f430415da66912d28171d430f911 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 10 Jun 2015 02:49:07 +0200 Subject: [PATCH] only count image attachments --- js/dom-functions.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index 4e0ed3f..90c14f8 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1931,10 +1931,6 @@ function buildQueetHtml(obj, idInStream, extraClassesThisRun, requeeted_by, isCo var attachment_html = ''; var attachmentNum = 0; if(typeof obj.attachments != "undefined") { - attachmentNum = obj.attachments.length; - if(attachmentNum>15){ - attachmentNum = 'more-than-fifteen'; - } $.each(obj.attachments, function(){ if(this.id != null) { var bigThumbW = 1000; @@ -1964,9 +1960,11 @@ function buildQueetHtml(obj, idInStream, extraClassesThisRun, requeeted_by, isCo } attachment_html = attachment_html + ''; + attachmentNum++; } else if (this.mimetype == 'image/svg+xml') { attachment_html = attachment_html + ''; + attachmentNum++; } }); }