Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

middleware.ts 769B

1234567891011121314151617181920212223242526
  1. import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
  2. import { showErrorNotification } from '../notifications/actions';
  3. import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
  4. import { TRANSCRIBER_LEFT } from './actionTypes';
  5. import './subscriber';
  6. /**
  7. * Implements the middleware of the feature transcribing.
  8. *
  9. * @param {Store} store - The redux store.
  10. * @returns {Function}
  11. */
  12. MiddlewareRegistry.register(({ dispatch }) => next => action => {
  13. switch (action.type) {
  14. case TRANSCRIBER_LEFT:
  15. if (action.abruptly) {
  16. dispatch(showErrorNotification({
  17. titleKey: 'transcribing.failed'
  18. }, NOTIFICATION_TIMEOUT_TYPE.LONG));
  19. }
  20. break;
  21. }
  22. return next(action);
  23. });