mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-03-13 14:40:01 +01:00
105 lines
2.1 KiB
JavaScript
105 lines
2.1 KiB
JavaScript
import appDispatcher from '../dispatcher';
|
|
import cons from '../state/cons';
|
|
|
|
export function selectTab(tabId) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.SELECT_TAB,
|
|
tabId,
|
|
});
|
|
}
|
|
|
|
export function selectSpace(roomId) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.SELECT_SPACE,
|
|
roomId,
|
|
});
|
|
}
|
|
|
|
export function selectRoom(roomId, eventId) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.SELECT_ROOM,
|
|
roomId,
|
|
eventId,
|
|
});
|
|
}
|
|
|
|
export function openInviteList() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_INVITE_LIST,
|
|
});
|
|
}
|
|
|
|
export function openPublicRooms(searchTerm) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_PUBLIC_ROOMS,
|
|
searchTerm,
|
|
});
|
|
}
|
|
|
|
export function openCreateRoom() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_CREATE_ROOM,
|
|
});
|
|
}
|
|
|
|
export function openInviteUser(roomId, searchTerm) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_INVITE_USER,
|
|
roomId,
|
|
searchTerm,
|
|
});
|
|
}
|
|
|
|
export function openProfileViewer(userId, roomId) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_PROFILE_VIEWER,
|
|
userId,
|
|
roomId,
|
|
});
|
|
}
|
|
|
|
export function openSettings() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_SETTINGS,
|
|
});
|
|
}
|
|
|
|
export function openEmojiBoard(cords, requestEmojiCallback) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_EMOJIBOARD,
|
|
cords,
|
|
requestEmojiCallback,
|
|
});
|
|
}
|
|
|
|
export function openReadReceipts(roomId, userIds) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_READRECEIPTS,
|
|
roomId,
|
|
userIds,
|
|
});
|
|
}
|
|
|
|
export function openRoomOptions(cords, roomId) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_ROOMOPTIONS,
|
|
cords,
|
|
roomId,
|
|
});
|
|
}
|
|
|
|
export function replyTo(userId, eventId, body) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.CLICK_REPLY_TO,
|
|
userId,
|
|
eventId,
|
|
body,
|
|
});
|
|
}
|
|
|
|
export function openSearch(term) {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.navigation.OPEN_SEARCH,
|
|
term,
|
|
});
|
|
}
|