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

123456789101112131415161718192021222324252627282930
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import {
  4. ETHERPAD_INITIALIZED,
  5. SET_DOCUMENT_EDITING_STATUS
  6. } from './actionTypes';
  7. /**
  8. * Reduces the Redux actions of the feature features/etherpad.
  9. */
  10. ReducerRegistry.register('features/etherpad', (state = {}, action) => {
  11. switch (action.type) {
  12. case ETHERPAD_INITIALIZED:
  13. return {
  14. ...state,
  15. initialized: true
  16. };
  17. case SET_DOCUMENT_EDITING_STATUS:
  18. return {
  19. ...state,
  20. editing: action.editing
  21. };
  22. default:
  23. return state;
  24. }
  25. });