Skip to content

Commit

Permalink
Remove speaker when opening menus
Browse files Browse the repository at this point in the history
  • Loading branch information
mdartic committed May 4, 2017
1 parent 483ae6a commit c4bf81f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
5 changes: 2 additions & 3 deletions modules/der-reader/src/der-reader.js
Expand Up @@ -17,7 +17,7 @@ import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import { Router, hashHistory } from 'react-router'
import appReducer from './store/reducers'
import { screenCalibrate, screenReader } from './middlewares/screen'
import { screenCalibrate } from './middlewares/screen'
import localstorage from './middlewares/localstorage'
import { syncHistoryWithStore, routerReducer } from 'react-router-redux'

Expand All @@ -36,8 +36,7 @@ const store = createStore(
}),
composeEnhancers(applyMiddleware(
localstorage,
screenCalibrate,
screenReader
screenCalibrate
))
)

Expand Down
19 changes: 0 additions & 19 deletions modules/der-reader/src/middlewares/screen.js
Expand Up @@ -37,22 +37,3 @@ export const screenCalibrate = () => next => action => {
}
next(action);
};

/**
* Middleware for resize application container to fit with DER.
*/
export const screenReader = () => next => action => {
if (action.type === LOCATION_CHANGE && Reader) {
switch (action.payload.pathname) {
case 'menu':
Reader.speak('Ouverture du menu');
break;
case 'filters':
Reader.speak('Ouverture des filtres');
break;
default:
break;
}
}
next(action);
};

0 comments on commit c4bf81f

Please sign in to comment.