remove dead uncalled code

This commit is contained in:
Sam 2013-06-23 15:28:17 +10:00
parent d4d8daaa6d
commit 25bb8cf382
3 changed files with 0 additions and 35 deletions

View File

@ -64,7 +64,6 @@ Discourse.ListController = Discourse.Controller.extend({
return Discourse.TopicList.list(current).then(function(items) {
listController.setProperties({
loading: false,
filterSummary: items.filter_summary,
filterMode: filterMode,
draft: items.draft,
draft_key: items.draft_key,

View File

@ -46,10 +46,6 @@ class TopicList
@topics_input.map {|t| t.id}
end
def filter_summary
@filter_summary ||= get_summary
end
def attributes
{'more_topics_url' => page}
end
@ -62,33 +58,4 @@ class TopicList
# Only show them on 'Hot'
return @filter == :hot
end
protected
def get_summary
s = {}
return s unless @current_user
split = SiteSetting.top_menu.split("|")
split.each do |i|
name, filter = i.split(",")
exclude = nil
if filter && filter[0] == "-"
exclude = filter[1..-1]
end
query = TopicQuery.new(@current_user, exclude_category: exclude)
s["unread"] = query.unread_count if name == 'unread'
s["new"] = query.new_count if name == 'new'
catSplit = name.split("/")
if catSplit[0] == "category" && catSplit.length == 2 && @current_user
query = TopicQuery.new(@current_user, only_category: catSplit[1], limit: false)
s[name] = query.unread_count + query.new_count
end
end
s
end
end

View File

@ -2,7 +2,6 @@ class TopicListSerializer < ApplicationSerializer
attributes :can_create_topic,
:more_topics_url,
# :filter_summary,
:draft,
:draft_key,
:draft_sequence,