This commit is contained in:
parent
2f2b84bfbb
commit
b22b2cbfac
9 changed files with 60 additions and 84 deletions
|
@ -50,6 +50,8 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
|
|||
};
|
||||
};
|
||||
|
||||
const excludeTypesFromSettings = state => state.getIn(['settings', 'notifications', 'shows']).filter(enabled => !enabled).keySeq().toJS();
|
||||
|
||||
export function refreshNotifications() {
|
||||
return (dispatch, getState) => {
|
||||
dispatch(refreshNotificationsRequest());
|
||||
|
@ -61,7 +63,7 @@ export function refreshNotifications() {
|
|||
params.since_id = ids.first().get('id');
|
||||
}
|
||||
|
||||
params.exclude_types = getState().getIn(['settings', 'notifications', 'shows']).filter(enabled => !enabled).keySeq().toJS();
|
||||
params.exclude_types = excludeTypesFromSettings(getState());
|
||||
|
||||
api(getState).get('/api/v1/notifications', { params }).then(response => {
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
|
@ -109,7 +111,7 @@ export function expandNotifications() {
|
|||
|
||||
const params = {};
|
||||
|
||||
params.exclude_types = getState().getIn(['settings', 'notifications', 'shows']).filter(enabled => !enabled).keySeq().toJS();
|
||||
params.exclude_types = excludeTypesFromSettings(getState());
|
||||
|
||||
api(getState).get(url, params).then(response => {
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue