Commit 8d2caf6d by Toby Lawrence

Back to what it was. Faster that way. -_-

parent db723550
...@@ -28,7 +28,7 @@ module ThreadUtils ...@@ -28,7 +28,7 @@ module ThreadUtils
thread_key = t._id.to_s thread_key = t._id.to_s
if read_dates.has_key? thread_key if read_dates.has_key? thread_key
is_read = read_dates[thread_key] >= t.updated_at is_read = read_dates[thread_key] >= t.updated_at
unread_comment_count = Comment.where( unread_comment_count = Comment.collection.find(
:comment_thread_id => t._id, :comment_thread_id => t._id,
:author_id => {"$ne" => user.id}, :author_id => {"$ne" => user.id},
:updated_at => {"$gte" => read_dates[thread_key]}, :updated_at => {"$gte" => read_dates[thread_key]},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment