From 30abdab9240cdcc2c1c36bf0c6ae224c83667d4c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 14 Dec 2022 12:54:42 -0600 Subject: [PATCH] features.feedUserFiltering --> features.carousel --- .../feed-filtering/__tests__/feed-carousel.test.tsx | 4 ++-- app/soapbox/pages/home-page.tsx | 2 +- app/soapbox/utils/features.ts | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx b/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx index f4c4690a9..514e23c4c 100644 --- a/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx +++ b/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx @@ -21,7 +21,7 @@ jest.mock('../../../hooks/useDimensions', () => ({ describe('', () => { let store: any; - describe('with "feedUserFiltering" disabled', () => { + describe('with "carousel" disabled', () => { beforeEach(() => { store = { instance: { @@ -42,7 +42,7 @@ describe('', () => { }); }); - describe('with "feedUserFiltering" enabled', () => { + describe('with "carousel" enabled', () => { beforeEach(() => { store = { instance: { diff --git a/app/soapbox/pages/home-page.tsx b/app/soapbox/pages/home-page.tsx index 94dbc83b7..c65d9b86c 100644 --- a/app/soapbox/pages/home-page.tsx +++ b/app/soapbox/pages/home-page.tsx @@ -59,7 +59,7 @@ const HomePage: React.FC = ({ children }) => { )} - {features.feedUserFiltering && } + {features.carousel && } {children} diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index f57458f98..9fc226b4e 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -205,6 +205,13 @@ const getInstanceFeatures = (instance: Instance) => { v.software === PLEROMA, ]), + /** + * Whether to show the Feed Carousel for suggested Statuses. + * @see GET /api/v1/truth/carousels/avatars + * @see GET /api/v1/truth/carousels/suggestions + */ + carousel: v.software === TRUTHSOCIAL, + /** * Ability to accept a chat. * POST /api/v1/pleroma/chats/:id/accept @@ -371,9 +378,6 @@ const getInstanceFeatures = (instance: Instance) => { /** Whether the instance federates. */ federating: federation.get('enabled', true) === true, // Assume true unless explicitly false - /** Whether or not to show the Feed Carousel for suggested Statuses */ - feedUserFiltering: v.software === TRUTHSOCIAL, - /** * Can edit and manage timeline filters (aka "muted words"). * @see {@link https://docs.joinmastodon.org/methods/accounts/filters/}