From 9212be9614a19f3d9fe804f63b76153aac04c836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Wed, 28 Aug 2024 22:21:07 +0200 Subject: [PATCH] Fix filter update, I guess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/actions/notifications.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/pl-fe/src/actions/notifications.ts b/packages/pl-fe/src/actions/notifications.ts index a9ea39461..ceb425fd2 100644 --- a/packages/pl-fe/src/actions/notifications.ts +++ b/packages/pl-fe/src/actions/notifications.ts @@ -298,13 +298,15 @@ const scrollTopNotifications = (top: boolean) => const setFilter = (filterType: FilterType, abort?: boolean) => (dispatch: AppDispatch, getState: () => RootState) => { + const activeFilter = getSettings(getState()).getIn(['notifications', 'quickFilter', 'active']); + dispatch({ type: NOTIFICATIONS_FILTER_SET, path: ['notifications', 'quickFilter', 'active'], value: filterType, }); dispatch(expandNotifications(undefined, undefined, abort)); - if (getSettings(getState()).getIn(['notifications', 'quickFilter', 'active']) !== filterType) dispatch(saveSettings()); + if (activeFilter !== filterType) dispatch(saveSettings()); }; const markReadNotifications = () =>