From 3d12df2c37379dde37ac9dce16fc196f3357e1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 3 May 2024 11:55:45 +0200 Subject: [PATCH] Feature-gate notification types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../notifications/components/filter-bar.tsx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/features/notifications/components/filter-bar.tsx b/src/features/notifications/components/filter-bar.tsx index 45f67d884..4b508a911 100644 --- a/src/features/notifications/components/filter-bar.tsx +++ b/src/features/notifications/components/filter-bar.tsx @@ -2,8 +2,7 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { setFilter } from 'soapbox/actions/notifications'; -import Icon from 'soapbox/components/icon'; -import { Tabs } from 'soapbox/components/ui'; +import { Icon, Tabs } from 'soapbox/components/ui'; import { useAppDispatch, useFeatures, useSettings } from 'soapbox/hooks'; import type { Item } from 'soapbox/components/ui/tabs/tabs'; @@ -46,43 +45,43 @@ const NotificationFilterBar = () => { }); } else { items.push({ - text: , + text: , title: intl.formatMessage(messages.mentions), action: onClick('mention'), name: 'mention', }); items.push({ - text: , + text: , title: intl.formatMessage(messages.favourites), action: onClick('favourite'), name: 'favourite', }); if (features.emojiReacts) items.push({ - text: , + text: , title: intl.formatMessage(messages.emoji_reacts), action: onClick('pleroma:emoji_reaction'), name: 'pleroma:emoji_reaction', }); items.push({ - text: , + text: , title: intl.formatMessage(messages.boosts), action: onClick('reblog'), name: 'reblog', }); - items.push({ - text: , + if (features.polls) items.push({ + text: , title: intl.formatMessage(messages.polls), action: onClick('poll'), name: 'poll', }); - items.push({ - text: , + if (features.accountNotifies || features.accountSubscriptions) items.push({ + text: , title: intl.formatMessage(messages.statuses), action: onClick('status'), name: 'status', }); items.push({ - text: , + text: , title: intl.formatMessage(messages.follows), action: onClick('follow'), name: 'follow',