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.

123456789101112131415161718192021222324
  1. import { ReducerRegistry } from '../../base/redux';
  2. import {
  3. _SET_APP_STATE_LISTENER,
  4. APP_STATE_CHANGED
  5. } from './actionTypes';
  6. ReducerRegistry.register('features/background', (state = {}, action) => {
  7. switch (action.type) {
  8. case _SET_APP_STATE_LISTENER:
  9. return {
  10. ...state,
  11. appStateListener: action.listener
  12. };
  13. case APP_STATE_CHANGED:
  14. return {
  15. ...state,
  16. appState: action.appState
  17. };
  18. }
  19. return state;
  20. });