2021-07-28 18:45:52 +05:30
|
|
|
import appDispatcher from '../dispatcher';
|
|
|
|
|
import cons from '../state/cons';
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function selectTab(tabId) {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
2021-09-05 18:56:34 +05:30
|
|
|
type: cons.actions.navigation.SELECT_TAB,
|
2021-07-28 18:45:52 +05:30
|
|
|
tabId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function selectSpace(roomId) {
|
2021-09-03 17:58:01 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.SELECT_SPACE,
|
|
|
|
|
roomId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function selectRoom(roomId, eventId) {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.SELECT_ROOM,
|
|
|
|
|
roomId,
|
2021-12-03 18:32:10 +05:30
|
|
|
eventId,
|
2021-07-28 18:45:52 +05:30
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-22 20:18:32 +05:30
|
|
|
export function toggleRoomSettings(roomId) {
|
|
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.TOGGLE_ROOM_SETTINGS,
|
|
|
|
|
roomId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openInviteList() {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_INVITE_LIST,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openPublicRooms(searchTerm) {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
2021-08-31 18:43:31 +05:30
|
|
|
type: cons.actions.navigation.OPEN_PUBLIC_ROOMS,
|
2021-08-08 14:45:21 +05:30
|
|
|
searchTerm,
|
2021-07-28 18:45:52 +05:30
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openCreateRoom() {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
2021-08-31 18:43:31 +05:30
|
|
|
type: cons.actions.navigation.OPEN_CREATE_ROOM,
|
2021-07-28 18:45:52 +05:30
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openInviteUser(roomId, searchTerm) {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_INVITE_USER,
|
|
|
|
|
roomId,
|
2021-08-08 10:23:26 +05:30
|
|
|
searchTerm,
|
2021-07-28 18:45:52 +05:30
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openProfileViewer(userId, roomId) {
|
2021-10-18 17:25:52 +02:00
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_PROFILE_VIEWER,
|
|
|
|
|
userId,
|
|
|
|
|
roomId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openSettings() {
|
2021-07-28 18:45:52 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_SETTINGS,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openEmojiBoard(cords, requestEmojiCallback) {
|
2021-08-14 10:19:29 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_EMOJIBOARD,
|
|
|
|
|
cords,
|
|
|
|
|
requestEmojiCallback,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openReadReceipts(roomId, userIds) {
|
2021-08-16 17:37:29 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_READRECEIPTS,
|
|
|
|
|
roomId,
|
2021-12-03 18:32:10 +05:30
|
|
|
userIds,
|
2021-08-16 17:37:29 +05:30
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openRoomOptions(cords, roomId) {
|
2021-09-09 17:49:57 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_ROOMOPTIONS,
|
|
|
|
|
cords,
|
|
|
|
|
roomId,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function replyTo(userId, eventId, body) {
|
2021-11-20 13:29:32 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.CLICK_REPLY_TO,
|
|
|
|
|
userId,
|
|
|
|
|
eventId,
|
|
|
|
|
body,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-11 10:50:34 +05:30
|
|
|
export function openSearch(term) {
|
2021-12-10 17:22:53 +05:30
|
|
|
appDispatcher.dispatch({
|
|
|
|
|
type: cons.actions.navigation.OPEN_SEARCH,
|
|
|
|
|
term,
|
|
|
|
|
});
|
|
|
|
|
}
|