2018-01-17 11:19:10 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import {
|
2018-05-14 17:37:48 +00:00
|
|
|
_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.
|
2018-05-14 17:37:48 +00:00
|
|
|
* @protected
|
2018-01-17 11:19:10 +00:00
|
|
|
* @returns {{
|
2018-05-14 17:37:48 +00:00
|
|
|
* type: _STORE_CURRENT_CONFERENCE,
|
2018-01-29 22:20:38 +00:00
|
|
|
* locationURL: Object
|
2018-01-17 11:19:10 +00:00
|
|
|
* }}
|
|
|
|
*/
|
2018-05-14 17:37:48 +00:00
|
|
|
export function _storeCurrentConference(locationURL: Object) {
|
2018-01-17 11:19:10 +00:00
|
|
|
return {
|
2018-05-14 17:37:48 +00:00
|
|
|
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.
|
2018-05-14 17:37:48 +00:00
|
|
|
* @protected
|
2018-01-17 11:19:10 +00:00
|
|
|
* @returns {{
|
2018-05-14 17:37:48 +00:00
|
|
|
* type: _UPDATE_CONFERENCE_DURATION,
|
2018-01-29 22:20:38 +00:00
|
|
|
* locationURL: Object
|
2018-01-17 11:19:10 +00:00
|
|
|
* }}
|
|
|
|
*/
|
2018-05-14 17:37:48 +00:00
|
|
|
export function _updateConferenceDuration(locationURL: Object) {
|
2018-01-17 11:19:10 +00:00
|
|
|
return {
|
2018-05-14 17:37:48 +00:00
|
|
|
type: _UPDATE_CONFERENCE_DURATION,
|
2018-01-17 11:19:10 +00:00
|
|
|
locationURL
|
|
|
|
};
|
|
|
|
}
|