jiti-meet/react/features/recent-list/actions.js

59 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-01-17 11:19:10 +00:00
// @flow
import {
_STORE_CURRENT_CONFERENCE,
2018-09-25 12:48:03 +00:00
_UPDATE_CONFERENCE_DURATION,
DELETE_RECENT_LIST_ENTRY
2018-01-17 11:19:10 +00:00
} from './actionTypes';
2018-09-25 12:48:03 +00:00
/**
* Deletes a recent list entry based on url and date.
*
* @param {Object} entryId - An object constructed of the url and the date of
* the entry for easy identification.
* @returns {{
* type: DELETE_RECENT_LIST_ENTRY,
* entryId: Object
* }}
*/
export function deleteRecentListEntry(entryId: Object) {
return {
type: DELETE_RECENT_LIST_ENTRY,
entryId
};
}
2018-01-17 11:19:10 +00:00
/**
* Action to initiate a new addition to the list.
*
* @param {Object} locationURL - The current location URL.
* @protected
2018-01-17 11:19:10 +00:00
* @returns {{
* type: _STORE_CURRENT_CONFERENCE,
2018-01-29 22:20:38 +00:00
* locationURL: Object
2018-01-17 11:19:10 +00:00
* }}
*/
export function _storeCurrentConference(locationURL: Object) {
2018-01-17 11:19:10 +00:00
return {
type: _STORE_CURRENT_CONFERENCE,
2018-01-17 11:19:10 +00:00
locationURL
};
}
/**
* Action to initiate the update of the duration of the last conference.
*
* @param {Object} locationURL - The current location URL.
* @protected
2018-01-17 11:19:10 +00:00
* @returns {{
* type: _UPDATE_CONFERENCE_DURATION,
2018-01-29 22:20:38 +00:00
* locationURL: Object
2018-01-17 11:19:10 +00:00
* }}
*/
export function _updateConferenceDuration(locationURL: Object) {
2018-01-17 11:19:10 +00:00
return {
type: _UPDATE_CONFERENCE_DURATION,
2018-01-17 11:19:10 +00:00
locationURL
};
}