diff --git a/app/assets/javascripts/mobile/mobile_comments.js b/app/assets/javascripts/mobile/mobile_comments.js index a6948b7a4..6eaf9ca61 100644 --- a/app/assets/javascripts/mobile/mobile_comments.js +++ b/app/assets/javascripts/mobile/mobile_comments.js @@ -109,7 +109,7 @@ url: toggleReactionsLink.attr("href"), success: function (data) { toggleReactionsLink.addClass("active").removeClass("loading"); - $(data).insertAfter(bottomBar.children(".show-comments").first()); + $(data).insertAfter(bottomBar.children(".post-actions-container").first()); self.showCommentBox(commentActionLink); bottomBarContainer.getCommentsContainer().find("time.timeago").timeago(); bottomBarContainer.activate(); diff --git a/app/views/shared/_stream_element.mobile.haml b/app/views/shared/_stream_element.mobile.haml index c76b0b0a6..36b55e09d 100644 --- a/app/views/shared/_stream_element.mobile.haml +++ b/app/views/shared/_stream_element.mobile.haml @@ -19,17 +19,19 @@ - if post.is_a?(StatusMessage) = render "status_messages/status_message", post: post, photos: post.photos - .bottom-bar.nsfw-hidden{class: ("inactive" unless defined?(expanded_info) && expanded_info)} + - expanded_info = defined?(expanded_info) && expanded_info + .bottom-bar.nsfw-hidden{class: ("inactive" unless expanded_info)} .post-actions-container - != show_comments_link(post, defined?(expanded_info) && expanded_info ? "active" : "") + != show_comments_link(post, expanded_info ? "active" : "") = render partial: "comments/post_stats", locals: {post: post} - .comment-container - %ul.comments - = render partial: "comments/comment", collection: post.comments.for_a_stream, locals: {post: post} + - if expanded_info + .comment-container + %ul.comments + = render partial: "comments/comment", collection: post.comments.for_a_stream, locals: {post: post} .ajax-loader.hidden .loader .spinner - .add-comment-switcher{class: ("hidden" unless defined?(expanded_info) && expanded_info)} + .add-comment-switcher{class: ("hidden" unless expanded_info)} = render partial: "comments/new_comment", locals: {post_id: post.id}