mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Remove unnecessary complex method.
This commit is contained in:
parent
711371e8c8
commit
9647a0a4bc
1 changed files with 3 additions and 6 deletions
|
@ -727,14 +727,11 @@ class TopicsController < ApplicationController
|
|||
end
|
||||
|
||||
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?
|
||||
yield(username_filters.split(',')) if block_given?
|
||||
options[:username_filters] = username_filters.split(',')
|
||||
end
|
||||
|
||||
@topic_view = TopicView.new(params[:topic_id], current_user, options)
|
||||
end
|
||||
|
||||
def toggle_mute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue