Revert "DEV: Improving topic tracking state code (#12555)" (#12864)

This reverts commit 45df579db05a133eaeb55693827a1ec7c2690b43.

This was causing huge browser freezes and crashes.
This commit is contained in:
Martin Brennan
2021-04-28 11:29:54 +10:00
committed by GitHub
parent 45df579db0
commit 6d53005e8b
10 changed files with 457 additions and 1379 deletions

View File

@ -914,7 +914,7 @@ class TopicsController < ApplicationController
topic_ids = params[:topic_ids].map { |t| t.to_i }
elsif params[:filter] == 'unread'
tq = TopicQuery.new(current_user)
topics = TopicQuery.unread_filter(tq.joined_topic_user, staff: guardian.is_staff?).listable_topics
topics = TopicQuery.unread_filter(tq.joined_topic_user, current_user.id, staff: guardian.is_staff?).listable_topics
topics = TopicQuery.tracked_filter(topics, current_user.id) if params[:tracked].to_s == "true"
if params[:category_id]