import { parseURIString, safeDecodeURIComponent } from '../base/util/uri'; /** * Transforms the history list to a displayable list. * * @private * @param {Array} recentList - The recent list form the redux store. * @returns {Array} */ export function toDisplayableList(recentList: Array<{ conference: string; date: Date; duration: number; }>) { return ( [ ...recentList ].reverse() .map(item => { return { date: item.date, duration: item.duration, time: [ item.date ], title: safeDecodeURIComponent(parseURIString(item.conference).room), url: item.conference }; })); } /** * Returns true if recent list is enabled and false otherwise. * * @returns {boolean} true if recent list is enabled and false * otherwise. */ export function isRecentListEnabled() { return interfaceConfig.RECENT_LIST_ENABLED; }