Fix comments not being lazy loaded in streams anymore
This commit is contained in:
parent
df8275f000
commit
3e1407d242
2 changed files with 9 additions and 7 deletions
|
|
@ -109,7 +109,7 @@
|
||||||
url: toggleReactionsLink.attr("href"),
|
url: toggleReactionsLink.attr("href"),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
toggleReactionsLink.addClass("active").removeClass("loading");
|
toggleReactionsLink.addClass("active").removeClass("loading");
|
||||||
$(data).insertAfter(bottomBar.children(".show-comments").first());
|
$(data).insertAfter(bottomBar.children(".post-actions-container").first());
|
||||||
self.showCommentBox(commentActionLink);
|
self.showCommentBox(commentActionLink);
|
||||||
bottomBarContainer.getCommentsContainer().find("time.timeago").timeago();
|
bottomBarContainer.getCommentsContainer().find("time.timeago").timeago();
|
||||||
bottomBarContainer.activate();
|
bottomBarContainer.activate();
|
||||||
|
|
|
||||||
|
|
@ -19,17 +19,19 @@
|
||||||
- if post.is_a?(StatusMessage)
|
- if post.is_a?(StatusMessage)
|
||||||
= render "status_messages/status_message", post: post, photos: post.photos
|
= 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
|
.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}
|
= render partial: "comments/post_stats", locals: {post: post}
|
||||||
.comment-container
|
- if expanded_info
|
||||||
%ul.comments
|
.comment-container
|
||||||
= render partial: "comments/comment", collection: post.comments.for_a_stream, locals: {post: post}
|
%ul.comments
|
||||||
|
= render partial: "comments/comment", collection: post.comments.for_a_stream, locals: {post: post}
|
||||||
|
|
||||||
.ajax-loader.hidden
|
.ajax-loader.hidden
|
||||||
.loader
|
.loader
|
||||||
.spinner
|
.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}
|
= render partial: "comments/new_comment", locals: {post_id: post.id}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue