2022-12-14 12:23:07 +00:00
|
|
|
import { parseURIString, safeDecodeURIComponent } from '../base/util/uri';
|
2018-08-01 16:41:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2018-10-22 18:49:18 +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>}
|
|
|
|
*/
|
2022-12-14 12:23:07 +00:00
|
|
|
export function toDisplayableList(recentList: Array<{ conference: string; date: Date; duration: number; }>) {
|
2018-10-22 18:49:18 +00:00
|
|
|
return (
|
2021-01-29 12:24:17 +00:00
|
|
|
[ ...recentList ].reverse()
|
2018-10-22 18:49:18 +00:00
|
|
|
.map(item => {
|
|
|
|
return {
|
|
|
|
date: item.date,
|
|
|
|
duration: item.duration,
|
|
|
|
time: [ item.date ],
|
2020-02-08 05:30:56 +00:00
|
|
|
title: safeDecodeURIComponent(parseURIString(item.conference).room),
|
2018-10-22 18:49:18 +00:00
|
|
|
url: item.conference
|
|
|
|
};
|
|
|
|
}));
|
2018-08-01 16:41:54 +00:00
|
|
|
}
|
|
|
|
|
2018-08-01 20:37:15 +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;
|
|
|
|
}
|