mirror of https://github.com/Siphonay/mastodon
Add option to hide notification markers
This commit is contained in:
parent
c762ca49dc
commit
a81bb14abe
|
@ -113,6 +113,14 @@ class LocalSettingsPage extends React.PureComponent {
|
|||
<FormattedMessage id='settings.notifications.favicon_badge' defaultMessage='Unread notifications favicon badge' />
|
||||
<span className='hint'><FormattedMessage id='settings.notifications.favicon_badge.hint' defaultMessage="Add a badge for unread notifications to the favicon" /></span>
|
||||
</LocalSettingsPageItem>
|
||||
<LocalSettingsPageItem
|
||||
settings={settings}
|
||||
item={['notifications', 'show_unread']}
|
||||
id='mastodon-settings--notifications-show_unread'
|
||||
onChange={onChange}
|
||||
>
|
||||
<FormattedMessage id='settings.notifications.show_unread' defaultMessage='Show unread marker' />
|
||||
</LocalSettingsPageItem>
|
||||
</section>
|
||||
<section>
|
||||
<h2><FormattedMessage id='settings.layout_opts' defaultMessage='Layout options' /></h2>
|
||||
|
|
|
@ -61,8 +61,8 @@ const mapStateToProps = state => ({
|
|||
hasMore: state.getIn(['notifications', 'hasMore']),
|
||||
numPending: state.getIn(['notifications', 'pendingItems'], ImmutableList()).size,
|
||||
notifCleaningActive: state.getIn(['notifications', 'cleaningMode']),
|
||||
lastReadId: state.getIn(['notifications', 'readMarkerId']),
|
||||
canMarkAsRead: state.getIn(['notifications', 'readMarkerId']) !== '0' && getNotifications(state).some(item => item !== null && compareId(item.get('id'), state.getIn(['notifications', 'readMarkerId'])) > 0),
|
||||
lastReadId: state.getIn(['local_settings', 'notifications', 'show_unread']) ? state.getIn(['notifications', 'readMarkerId']) : '0',
|
||||
canMarkAsRead: state.getIn(['local_settings', 'notifications', 'show_unread']) && state.getIn(['notifications', 'readMarkerId']) !== '0' && getNotifications(state).some(item => item !== null && compareId(item.get('id'), state.getIn(['notifications', 'readMarkerId'])) > 0),
|
||||
needsNotificationPermission: state.getIn(['settings', 'notifications', 'alerts']).includes(true) && state.getIn(['notifications', 'browserSupport']) && state.getIn(['notifications', 'browserPermission']) === 'default',
|
||||
});
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ const initialState = ImmutableMap({
|
|||
notifications : ImmutableMap({
|
||||
favicon_badge : false,
|
||||
tab_badge : true,
|
||||
show_unread : true,
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue