jiti-meet/react/features/recent-list/functions.web.js

36 lines
958 B
JavaScript
Raw Normal View History

/* global interfaceConfig */
import { parseURIString } from '../base/util';
2018-08-01 16:41:54 +00:00
/**
* Transforms the history list to a displayable list.
2018-08-01 16:41:54 +00:00
*
* @private
* @param {Array<Object>} recentList - The recent list form the redux store.
* @returns {Array<Object>}
*/
export function toDisplayableList(recentList) {
return (
recentList.slice(-3).reverse()
.map(item => {
return {
date: item.date,
duration: item.duration,
time: [ item.date ],
title: parseURIString(item.conference).room,
url: item.conference
};
}));
2018-08-01 16:41:54 +00:00
}
/**
* Returns <tt>true</tt> if recent list is enabled and <tt>false</tt> otherwise.
*
* @returns {boolean} <tt>true</tt> if recent list is enabled and <tt>false</tt>
* otherwise.
*/
export function isRecentListEnabled() {
return interfaceConfig.RECENT_LIST_ENABLED;
}