don't show clones or hidden posts in the gallery

This commit is contained in:
ccd0 2014-07-20 13:09:01 -07:00
parent cbee0b96c1
commit d87606d3dd

View File

@ -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