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 576B

1234567891011121314151617181920212223242526
  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. const DEFAULT_STATE = {
  8. capturesEnabled: false
  9. };
  10. ReducerRegistry.register('features/screenshot-capture', (state = DEFAULT_STATE, action) => {
  11. switch (action.type) {
  12. case SET_SCREENSHOT_CAPTURE: {
  13. return {
  14. ...state,
  15. capturesEnabled: action.payload
  16. };
  17. }
  18. }
  19. return state;
  20. });