You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reducer.js 510B

12345678910111213141516171819202122
  1. // @flow
  2. import { PersistenceRegistry, ReducerRegistry } from '../base/redux';
  3. import { SET_SCREENSHOT_CAPTURE } from './actionTypes';
  4. PersistenceRegistry.register('features/screnshot-capture', true, {
  5. capturesEnabled: false
  6. });
  7. ReducerRegistry.register('features/screenshot-capture', (state = {}, action) => {
  8. switch (action.type) {
  9. case SET_SCREENSHOT_CAPTURE: {
  10. return {
  11. ...state,
  12. capturesEnabled: action.payload
  13. };
  14. }
  15. }
  16. return state;
  17. });