From bb16b3e30bdc2afda7bd29c11281005101aabb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 8 Apr 2018 17:50:27 -0400 Subject: [PATCH] Simplify showing/hiding "More" button of a new preview on active channel --- client/js/renderPreview.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/js/renderPreview.js b/client/js/renderPreview.js index 423d6398..1f4ddf77 100644 --- a/client/js/renderPreview.js +++ b/client/js/renderPreview.js @@ -101,9 +101,7 @@ function appendPreview(preview, msg, template) { if (activeChannelId === channelId) { // If this preview is in active channel, hide "More" button if necessary - if (preview.type === "link") { - window.requestAnimationFrame(showMoreIfNeeded); - } + previewContent.trigger("showMoreIfNeeded"); container.trigger("keepToBottom"); }