From c9edf20ab7cae59901892bb648e99e5905237f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 11 Jul 2022 20:10:14 +0200 Subject: [PATCH] Show different 'empty notifications' message if category is selected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/features/notifications/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/notifications/index.js b/app/soapbox/features/notifications/index.js index 5ac0877d1..834bb39cb 100644 --- a/app/soapbox/features/notifications/index.js +++ b/app/soapbox/features/notifications/index.js @@ -47,6 +47,7 @@ const mapStateToProps = state => { return { showFilterBar: settings.getIn(['notifications', 'quickFilter', 'show']), + activeFilter: settings.getIn(['notifications', 'quickFilter', 'active']), notifications: getNotifications(state), isLoading: state.getIn(['notifications', 'isLoading'], true), isUnread: state.getIn(['notifications', 'unread']) > 0, @@ -62,6 +63,7 @@ class Notifications extends React.PureComponent { static propTypes = { notifications: ImmutablePropTypes.list.isRequired, showFilterBar: PropTypes.bool.isRequired, + activeFilter: PropTypes.string, dispatch: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, isLoading: PropTypes.bool, @@ -143,8 +145,11 @@ class Notifications extends React.PureComponent { } render() { - const { intl, notifications, isLoading, hasMore, showFilterBar, totalQueuedNotificationsCount } = this.props; - const emptyMessage = ; + const { intl, notifications, isLoading, hasMore, showFilterBar, totalQueuedNotificationsCount, activeFilter } = this.props; + + const emptyMessage = activeFilter === 'all' + ? + : ; let scrollableContent = null;