From aeb4743a9d0da772141d4bbbd4f5030ab704dce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 3 May 2024 15:23:53 +0200 Subject: [PATCH] Remove unused feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/actions/notifications.ts | 3 +-- src/actions/settings.ts | 11 ----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/actions/notifications.ts b/src/actions/notifications.ts index f5af37eb0..20d4dde3e 100644 --- a/src/actions/notifications.ts +++ b/src/actions/notifications.ts @@ -103,7 +103,6 @@ const updateNotificationsQueue = (notification: APIEntity, intlMessages: Record< if (!notification.type) return; // drop invalid notifications if (notification.type === 'pleroma:chat_mention') return; // Drop chat notifications, handle them per-chat - const showAlert = getSettings(getState()).getIn(['notifications', 'alerts', notification.type]); const filters = getFilters(getState(), { contextType: 'notifications' }); const playSound = getSettings(getState()).getIn(['notifications', 'sounds', notification.type]); @@ -122,7 +121,7 @@ const updateNotificationsQueue = (notification: APIEntity, intlMessages: Record< // eslint-disable-next-line compat/compat const isNotificationsEnabled = window.Notification?.permission === 'granted'; - if (showAlert && !filtered && isNotificationsEnabled) { + if (!filtered && isNotificationsEnabled) { const title = new IntlMessageFormat(intlMessages[`notification.${notification.type}`], intlLocale).format({ name: notification.account.display_name.length > 0 ? notification.account.display_name : notification.account.username }); const body = (notification.status && notification.status.spoiler_text.length > 0) ? notification.status.spoiler_text : unescapeHTML(notification.status ? notification.status.content : ''); diff --git a/src/actions/settings.ts b/src/actions/settings.ts index 436e008fc..d732c999b 100644 --- a/src/actions/settings.ts +++ b/src/actions/settings.ts @@ -64,17 +64,6 @@ const defaultSettings = ImmutableMap({ }), notifications: ImmutableMap({ - alerts: ImmutableMap({ - follow: true, - follow_request: false, - favourite: true, - reblog: true, - mention: true, - poll: true, - move: true, - 'pleroma:emoji_reaction': true, - }), - quickFilter: ImmutableMap({ active: 'all', show: true,