From 32d998b62333a768af3a274d265fd02483ce15de Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 19 Dec 2019 19:41:02 -0600 Subject: add preference options to a: hide boosts globally, & b: show only packmates across all timelines - works in all client apps --- app/controllers/api/v1/timelines/home_controller.rb | 6 +++++- app/controllers/api/v1/timelines/list_controller.rb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'app/controllers/api') diff --git a/app/controllers/api/v1/timelines/home_controller.rb b/app/controllers/api/v1/timelines/home_controller.rb index fcd0757f1..01d4e3360 100644 --- a/app/controllers/api/v1/timelines/home_controller.rb +++ b/app/controllers/api/v1/timelines/home_controller.rb @@ -23,7 +23,11 @@ class Api::V1::Timelines::HomeController < Api::BaseController end def cached_home_statuses - cache_collection home_statuses, Status + if current_account&.user&.hides_boosts? + cache_collection home_statuses.without_reblogs, Status + else + cache_collection home_statuses, Status + end end def home_statuses diff --git a/app/controllers/api/v1/timelines/list_controller.rb b/app/controllers/api/v1/timelines/list_controller.rb index a15eae468..15934adb3 100644 --- a/app/controllers/api/v1/timelines/list_controller.rb +++ b/app/controllers/api/v1/timelines/list_controller.rb @@ -25,7 +25,11 @@ class Api::V1::Timelines::ListController < Api::BaseController end def cached_list_statuses - cache_collection list_statuses, Status + if current_account&.user&.hides_boosts? + cache_collection list_statuses.without_reblogs, Status + else + cache_collection list_statuses, Status + end end def list_statuses -- cgit