2021-07-28 16:15:52 +03:00
|
|
|
import appDispatcher from '../dispatcher';
|
|
|
|
import cons from '../state/cons';
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function selectTab(tabId) {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
2021-09-05 16:26:34 +03:00
|
|
|
type: cons.actions.navigation.SELECT_TAB,
|
2021-07-28 16:15:52 +03:00
|
|
|
tabId,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function selectSpace(roomId) {
|
2021-09-03 15:28:01 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.SELECT_SPACE,
|
|
|
|
roomId,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function selectRoom(roomId, eventId) {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.SELECT_ROOM,
|
|
|
|
roomId,
|
2021-12-03 15:02:10 +02:00
|
|
|
eventId,
|
2021-07-28 16:15:52 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-01-29 10:18:06 +02:00
|
|
|
export function openSpaceSettings(spaceId, tabText) {
|
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_SPACE_SETTINGS,
|
|
|
|
spaceId,
|
|
|
|
tabText,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-01-16 14:48:33 +02:00
|
|
|
export function toggleRoomSettings(tabText) {
|
2021-12-22 16:48:32 +02:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.TOGGLE_ROOM_SETTINGS,
|
2022-01-16 14:48:33 +02:00
|
|
|
tabText,
|
2021-12-22 16:48:32 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openInviteList() {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_INVITE_LIST,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openPublicRooms(searchTerm) {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
2021-08-31 16:13:31 +03:00
|
|
|
type: cons.actions.navigation.OPEN_PUBLIC_ROOMS,
|
2021-08-08 12:15:21 +03:00
|
|
|
searchTerm,
|
2021-07-28 16:15:52 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openCreateRoom() {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
2021-08-31 16:13:31 +03:00
|
|
|
type: cons.actions.navigation.OPEN_CREATE_ROOM,
|
2021-07-28 16:15:52 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openInviteUser(roomId, searchTerm) {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_INVITE_USER,
|
|
|
|
roomId,
|
2021-08-08 07:53:26 +03:00
|
|
|
searchTerm,
|
2021-07-28 16:15:52 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openProfileViewer(userId, roomId) {
|
2021-10-18 18:25:52 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_PROFILE_VIEWER,
|
|
|
|
userId,
|
|
|
|
roomId,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openSettings() {
|
2021-07-28 16:15:52 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_SETTINGS,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openEmojiBoard(cords, requestEmojiCallback) {
|
2021-08-14 07:49:29 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_EMOJIBOARD,
|
|
|
|
cords,
|
|
|
|
requestEmojiCallback,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openReadReceipts(roomId, userIds) {
|
2021-08-16 15:07:29 +03:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_READRECEIPTS,
|
|
|
|
roomId,
|
2021-12-03 15:02:10 +02:00
|
|
|
userIds,
|
2021-08-16 15:07:29 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function replyTo(userId, eventId, body) {
|
2021-11-20 09:59:32 +02:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.CLICK_REPLY_TO,
|
|
|
|
userId,
|
|
|
|
eventId,
|
|
|
|
body,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-11 07:20:34 +02:00
|
|
|
export function openSearch(term) {
|
2021-12-10 13:52:53 +02:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_SEARCH,
|
|
|
|
term,
|
|
|
|
});
|
|
|
|
}
|
2022-01-11 17:16:41 +02:00
|
|
|
|
2022-01-13 15:13:22 +02:00
|
|
|
export function openReusableContextMenu(placement, cords, render, afterClose) {
|
2022-01-11 17:16:41 +02:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
type: cons.actions.navigation.OPEN_REUSABLE_CONTEXT_MENU,
|
|
|
|
placement,
|
|
|
|
cords,
|
|
|
|
render,
|
2022-01-13 15:13:22 +02:00
|
|
|
afterClose,
|
2022-01-11 17:16:41 +02:00
|
|
|
});
|
|
|
|
}
|