From 82ae95f8cacda5046ea39e1c18f99678bb3dee20 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Wed, 11 Jul 2012 14:32:04 -0500 Subject: [PATCH] disable trimming threads to our own reply for now, it's busted --- app/controllers/comments_controller.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 881c63c..a904f7d 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -144,9 +144,7 @@ class CommentsController < ApplicationController end def threads - recent_threads = @user.recent_threads(20) - - @threads = recent_threads.map{|r| + @threads = @user.recent_threads(20).map{|r| cs = Comment.ordered_for_story_or_thread_for_user(nil, r, @user) @votes = Vote.comment_votes_by_user_for_story_hash(@user.id, @@ -162,6 +160,8 @@ class CommentsController < ApplicationController } # trim each thread to this user's first response + # XXX: busted +if false @threads.map!{|th| th.each do |c| if c.user_id == @user.id @@ -173,7 +173,8 @@ class CommentsController < ApplicationController th } - +end + @comments = @threads.flatten end end