};
};
-export function submitMarkers() {
- return (dispatch, getState) => debouncedSubmitMarkers(dispatch, getState);
+export function submitMarkers(params = {}) {
+ const result = (dispatch, getState) => debouncedSubmitMarkers(dispatch, getState);
+ if (params.immediate === true) {
+ debouncedSubmitMarkers.flush();
+ }
+ return result;
};
export const fetchMarkers = () => (dispatch, getState) => {
unmountNotifications,
markNotificationsAsRead,
} from '../../actions/notifications';
+import { submitMarkers } from '../../actions/markers';
import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
import NotificationContainer from './containers/notification_container';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
handleMarkAsRead = () => {
this.props.dispatch(markNotificationsAsRead());
+ this.props.dispatch(submitMarkers({ immediate: true }));
};
render () {
handleWindowFocus = () => {
this.props.dispatch(focusApp());
- this.props.dispatch(submitMarkers());
+ this.props.dispatch(submitMarkers({ immediate: true }));
}
handleWindowBlur = () => {