2022-02-27 12:32:03 +01:00
|
|
|
import appDispatcher from '../dispatcher';
|
|
|
|
import cons from '../state/cons';
|
|
|
|
|
2022-03-06 13:21:21 +01:00
|
|
|
/**
|
|
|
|
* @param {string | string[]} roomId - room id or array of them to add into shortcuts
|
|
|
|
*/
|
2022-02-27 12:32:03 +01:00
|
|
|
export function createSpaceShortcut(roomId) {
|
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.accountData.CREATE_SPACE_SHORTCUT,
|
|
|
|
roomId,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function deleteSpaceShortcut(roomId) {
|
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.accountData.DELETE_SPACE_SHORTCUT,
|
|
|
|
roomId,
|
|
|
|
});
|
|
|
|
}
|
2022-03-02 16:54:11 +01:00
|
|
|
|
|
|
|
export function categorizeSpace(roomId) {
|
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.accountData.CATEGORIZE_SPACE,
|
|
|
|
roomId,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function unCategorizeSpace(roomId) {
|
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.accountData.UNCATEGORIZE_SPACE,
|
|
|
|
roomId,
|
|
|
|
});
|
|
|
|
}
|