Add preferences for notification badges

This commit is contained in:
Thibaut Girka
2018-09-06 20:55:11 +02:00
committed by ThibG
parent ba4521b175
commit 324ce93368
6 changed files with 39 additions and 6 deletions

View File

@@ -35,6 +35,7 @@ const mapStateToProps = state => ({
searchValue: state.getIn(['search', 'value']),
submitted: state.getIn(['search', 'submitted']),
unreadNotifications: state.getIn(['notifications', 'unread']),
showNotificationsBadge: state.getIn(['local_settings', 'notifications', 'tab_badge']),
});
// Dispatch mapping.
@@ -89,6 +90,7 @@ class Drawer extends React.Component {
submitted,
isSearchPage,
unreadNotifications,
showNotificationsBadge,
} = this.props;
const computedClass = classNames('drawer', `mbstobon-${elefriend}`);
@@ -99,6 +101,7 @@ class Drawer extends React.Component {
<DrawerHeader
columns={columns}
unreadNotifications={unreadNotifications}
showNotificationsBadge={showNotificationsBadge}
intl={intl}
onSettingsClick={onOpenSettings}
/>
@@ -143,6 +146,7 @@ Drawer.propTypes = {
searchValue: PropTypes.string,
submitted: PropTypes.bool,
unreadNotifications: PropTypes.number,
showNotificationsBadge: PropTypes.bool,
// Dispatch props.
onChange: PropTypes.func,