features.feedUserFiltering --> features.carousel

timeline-settings
Alex Gleason 2022-12-14 12:54:42 -06:00
rodzic 113de75355
commit 30abdab924
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
3 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -21,7 +21,7 @@ jest.mock('../../../hooks/useDimensions', () => ({
describe('<FeedCarousel />', () => { describe('<FeedCarousel />', () => {
let store: any; let store: any;
describe('with "feedUserFiltering" disabled', () => { describe('with "carousel" disabled', () => {
beforeEach(() => { beforeEach(() => {
store = { store = {
instance: { instance: {
@ -42,7 +42,7 @@ describe('<FeedCarousel />', () => {
}); });
}); });
describe('with "feedUserFiltering" enabled', () => { describe('with "carousel" enabled', () => {
beforeEach(() => { beforeEach(() => {
store = { store = {
instance: { instance: {

Wyświetl plik

@ -59,7 +59,7 @@ const HomePage: React.FC = ({ children }) => {
</Card> </Card>
)} )}
{features.feedUserFiltering && <FeedCarousel />} {features.carousel && <FeedCarousel />}
{children} {children}

Wyświetl plik

@ -205,6 +205,13 @@ const getInstanceFeatures = (instance: Instance) => {
v.software === PLEROMA, 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. * Ability to accept a chat.
* POST /api/v1/pleroma/chats/:id/accept * POST /api/v1/pleroma/chats/:id/accept
@ -371,9 +378,6 @@ const getInstanceFeatures = (instance: Instance) => {
/** Whether the instance federates. */ /** Whether the instance federates. */
federating: federation.get('enabled', true) === true, // Assume true unless explicitly false 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"). * Can edit and manage timeline filters (aka "muted words").
* @see {@link https://docs.joinmastodon.org/methods/accounts/filters/} * @see {@link https://docs.joinmastodon.org/methods/accounts/filters/}