diff --git a/app/models/post.rb b/app/models/post.rb index c8e86cc6a..4666fd923 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -53,7 +53,7 @@ class Post < ActiveRecord::Base # gives the last three comments on the post def last_three_comments return if self.comments_count == 0 - self.comments.last(3) + self.comments.includes(:author => :profile).last(3) end def self.excluding_blocks(user) diff --git a/app/views/aspects/_aspect_stream.haml b/app/views/aspects/_aspect_stream.haml index 75be08ae2..2fd662793 100644 --- a/app/views/aspects/_aspect_stream.haml +++ b/app/views/aspects/_aspect_stream.haml @@ -18,7 +18,7 @@ #gs-shim{:title => popover_with_close_html("3. #{t('.stay_updated')}"), 'data-content' => t('.stay_updated_explanation')} -#main_stream.stream{:data => {:guids => stream.aspect_ids.join(','), :time_for_scroll => time_for_scroll(stream.ajax_stream?, stream)}} +#main_stream.stream{:data => {:guids => stream.aspect_ids.join(','), :time_for_scroll => (@backbone ? '' : time_for_scroll(stream.ajax_stream?, stream))}} - if !@backbone && !stream.ajax_stream? && stream.stream_posts.length > 0 = render 'shared/stream', :posts => stream.stream_posts diff --git a/public/javascripts/content-updater.js b/public/javascripts/content-updater.js index fbb029e91..6a073ac18 100644 --- a/public/javascripts/content-updater.js +++ b/public/javascripts/content-updater.js @@ -48,11 +48,8 @@ var ContentUpdater = { addLikesToPost: function(postGUID, html) { var likesContainer = $(".likes_container:first", "#" + postGUID) - .fadeOut("fast") .html(html); Diaspora.page.publish("likes/" + postGUID + "/updated"); - - likesContainer.fadeIn("fast"); } }; diff --git a/public/javascripts/pages/mentions-index.js b/public/javascripts/pages/mentions-index.js index 296bfd0ad..16cb4f832 100644 --- a/public/javascripts/pages/mentions-index.js +++ b/public/javascripts/pages/mentions-index.js @@ -2,9 +2,6 @@ Diaspora.Pages.MentionsIndex = function() { var self = this; this.subscribe("page/ready", function(evt, document) { - self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav")); - self.stream = self.instantiate("Stream", document.find("#aspect_stream_container")); - self.infiniteScroll = self.instantiate("InfiniteScroll"); }); }; diff --git a/public/javascripts/pages/multis-index.js b/public/javascripts/pages/multis-index.js index 20dd08191..5bbb25321 100644 --- a/public/javascripts/pages/multis-index.js +++ b/public/javascripts/pages/multis-index.js @@ -3,9 +3,5 @@ Diaspora.Pages.MultisIndex = function() { this.subscribe("page/ready", function(evt, document) { self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav")); - self.stream = self.instantiate("Stream", document.find("#aspect_stream_container")); - self.infiniteScroll = self.instantiate("InfiniteScroll"); - - $('.indicator').twipsy({placement:'below', live:true}); }); }; diff --git a/public/javascripts/pages/people-show.js b/public/javascripts/pages/people-show.js index 84c0173b8..6607d89b2 100644 --- a/public/javascripts/pages/people-show.js +++ b/public/javascripts/pages/people-show.js @@ -1,8 +1,3 @@ Diaspora.Pages.PeopleShow = function() { var self = this; - - this.subscribe("page/ready", function(evt, document) { - self.stream = self.instantiate("Stream", document.find("#main_stream")); - self.infiniteScroll = self.instantiate("InfiniteScroll"); - }); -}; \ No newline at end of file +}; diff --git a/public/javascripts/pages/tag-followings-index.js b/public/javascripts/pages/tag-followings-index.js index 50b0275e0..71dc24aa8 100644 --- a/public/javascripts/pages/tag-followings-index.js +++ b/public/javascripts/pages/tag-followings-index.js @@ -3,7 +3,5 @@ Diaspora.Pages.TagFollowingsIndex = function() { this.subscribe("page/ready", function(evt, document) { self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav")); - self.stream = self.instantiate("Stream", document.find("#aspect_stream_container")); - self.infiniteScroll = self.instantiate("InfiniteScroll"); }); }; diff --git a/public/javascripts/pages/tags-show.js b/public/javascripts/pages/tags-show.js index bc4eab537..29f1014c8 100644 --- a/public/javascripts/pages/tags-show.js +++ b/public/javascripts/pages/tags-show.js @@ -1,9 +1,2 @@ Diaspora.Pages.TagsShow = function() { - var self = this; - - this.subscribe("page/ready", function(evt, document) { - self.stream = self.instantiate("Stream", document.find("#main_stream")); - self.infiniteScroll = self.instantiate("InfiniteScroll"); - self.instantiate("TimeAgo", document.find("abbr.timeago")); - }); };