From d87606d3dd144a1b02533cc24a17a1a6c01f90ce Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 20 Jul 2014 13:09:01 -0700 Subject: [PATCH] don't show clones or hidden posts in the gallery --- src/Images/Gallery.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 3f654ba0d..4a8c033a7 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -77,7 +77,7 @@ Gallery = nodes.current.parentElement.scrollTop = 0 Gallery.cb.open.call if image - $ "[href='#{image.href}']", nodes.thumbs + $("[href='#{image.href}']", nodes.thumbs) or Gallery.images[0] else Gallery.images[0] @@ -86,6 +86,7 @@ Gallery = generateThumb: (file) -> post = Get.postFromNode file + return if post.isClone or post.isHidden return unless post.file and (post.file.isImage or post.file.isVideo or Conf['PDF in Gallery']) return if Gallery.fullIDs[post.fullID] Gallery.fullIDs[post.fullID] = true