mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue