Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

actions.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // @flow
  2. import {
  3. _STORE_CURRENT_CONFERENCE,
  4. _UPDATE_CONFERENCE_DURATION,
  5. DELETE_RECENT_LIST_ENTRY
  6. } from './actionTypes';
  7. /**
  8. * Deletes a recent list entry based on url and date.
  9. *
  10. * @param {Object} entryId - An object constructed of the url and the date of
  11. * the entry for easy identification.
  12. * @returns {{
  13. * type: DELETE_RECENT_LIST_ENTRY,
  14. * entryId: Object
  15. * }}
  16. */
  17. export function deleteRecentListEntry(entryId: Object) {
  18. return {
  19. type: DELETE_RECENT_LIST_ENTRY,
  20. entryId
  21. };
  22. }
  23. /**
  24. * Action to initiate a new addition to the list.
  25. *
  26. * @param {Object} locationURL - The current location URL.
  27. * @protected
  28. * @returns {{
  29. * type: _STORE_CURRENT_CONFERENCE,
  30. * locationURL: Object
  31. * }}
  32. */
  33. export function _storeCurrentConference(locationURL: Object) {
  34. return {
  35. type: _STORE_CURRENT_CONFERENCE,
  36. locationURL
  37. };
  38. }
  39. /**
  40. * Action to initiate the update of the duration of the last conference.
  41. *
  42. * @param {Object} locationURL - The current location URL.
  43. * @protected
  44. * @returns {{
  45. * type: _UPDATE_CONFERENCE_DURATION,
  46. * locationURL: Object
  47. * }}
  48. */
  49. export function _updateConferenceDuration(locationURL: Object) {
  50. return {
  51. type: _UPDATE_CONFERENCE_DURATION,
  52. locationURL
  53. };
  54. }