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

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