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.

functions.web.js 996B

1234567891011121314151617181920212223242526272829303132333435
  1. /* global interfaceConfig */
  2. import { parseURIString, safeDecodeURIComponent } from '../base/util';
  3. /**
  4. * Transforms the history list to a displayable list.
  5. *
  6. * @private
  7. * @param {Array<Object>} recentList - The recent list form the redux store.
  8. * @returns {Array<Object>}
  9. */
  10. export function toDisplayableList(recentList) {
  11. return (
  12. recentList.reverse()
  13. .map(item => {
  14. return {
  15. date: item.date,
  16. duration: item.duration,
  17. time: [ item.date ],
  18. title: safeDecodeURIComponent(parseURIString(item.conference).room),
  19. url: item.conference
  20. };
  21. }));
  22. }
  23. /**
  24. * Returns <tt>true</tt> if recent list is enabled and <tt>false</tt> otherwise.
  25. *
  26. * @returns {boolean} <tt>true</tt> if recent list is enabled and <tt>false</tt>
  27. * otherwise.
  28. */
  29. export function isRecentListEnabled() {
  30. return interfaceConfig.RECENT_LIST_ENABLED;
  31. }