hide ugoira preview/video link if it hasn't finished processing

This commit is contained in:
r888888888
2014-10-28 11:30:02 -07:00
parent 94fd03f5d0
commit 3aa0ee2a75
4 changed files with 17 additions and 2 deletions

View File

@@ -10,6 +10,11 @@ class PostPresenter < Presenter
return ""
end
if post.is_ugoira? && !post.has_ugoira_webm?
# ugoira preview gen is async so dont render it immediately
return ""
end
path = options[:path_prefix] || "/posts"
html = %{<article id="post_#{post.id}" class="#{preview_class(post, options[:pool])}" #{data_attributes(post)}>}