damencho a4cbbccb2a Fixes loading recent lists on wrong meeting name stored.
decodeURIComponent is not needed any more and after adding a validation such meeting name should not happen to be stored.
2019-10-16 17:52:24 +01:00

36 lines
958 B
JavaScript

/* global interfaceConfig */
import { parseURIString } from '../base/util';
/**
* Transforms the history list to a displayable list.
*
* @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
};
}));
}
/**
* 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;
}