Simplify showing/hiding "More" button of a new preview on active channel

This commit is contained in:
Jérémie Astori 2018-04-08 17:50:27 -04:00
parent d55420faae
commit bb16b3e30b
No known key found for this signature in database
GPG Key ID: B9A4F245CD67BDE8

View File

@ -101,9 +101,7 @@ function appendPreview(preview, msg, template) {
if (activeChannelId === channelId) { if (activeChannelId === channelId) {
// If this preview is in active channel, hide "More" button if necessary // If this preview is in active channel, hide "More" button if necessary
if (preview.type === "link") { previewContent.trigger("showMoreIfNeeded");
window.requestAnimationFrame(showMoreIfNeeded);
}
container.trigger("keepToBottom"); container.trigger("keepToBottom");
} }