summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 3d9184979d7..b003ca564f3 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -14,7 +14,7 @@ class DashboardController < Dashboard::ApplicationController
respond_to :html
- feature_category :users, [:activity]
+ feature_category :user_profile, [:activity]
feature_category :team_planning, [:issues, :issues_calendar]
feature_category :code_review_workflow, [:merge_requests]
@@ -36,17 +36,20 @@ class DashboardController < Dashboard::ApplicationController
def load_events
@events =
- if params[:filter] == "followed"
- load_user_events
- else
+ case params[:filter]
+ when "projects", "starred"
load_project_events
+ when "followed"
+ load_user_events(current_user.followees)
+ else
+ load_user_events(current_user)
end
Events::RenderService.new(current_user).execute(@events)
end
- def load_user_events
- UserRecentEventsFinder.new(current_user, current_user.followees, event_filter, params).execute
+ def load_user_events(user)
+ UserRecentEventsFinder.new(current_user, user, event_filter, params).execute
end
def load_project_events