mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:51:14 +08:00
Remove unnecessary complex method.
This commit is contained in:
@ -727,14 +727,11 @@ class TopicsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fetch_topic_view(options)
|
def fetch_topic_view(options)
|
||||||
check_username_filters { |usernames| options[:username_filters] = usernames }
|
|
||||||
@topic_view = TopicView.new(params[:topic_id], current_user, options)
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_username_filters
|
|
||||||
if (username_filters = params[:username_filters]).present?
|
if (username_filters = params[:username_filters]).present?
|
||||||
yield(username_filters.split(',')) if block_given?
|
options[:username_filters] = username_filters.split(',')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@topic_view = TopicView.new(params[:topic_id], current_user, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def toggle_mute
|
def toggle_mute
|
||||||
|
Reference in New Issue
Block a user