mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 03:30:29 +03:00
Move space shortcut from roomlist to accountdata
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
7db674b65d
commit
a62df536dd
10 changed files with 131 additions and 77 deletions
16
src/client/action/accountData.js
Normal file
16
src/client/action/accountData.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import appDispatcher from '../dispatcher';
|
||||
import cons from '../state/cons';
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
|
@ -298,24 +298,9 @@ async function setPowerLevel(roomId, userId, powerLevel) {
|
|||
return result;
|
||||
}
|
||||
|
||||
function createSpaceShortcut(roomId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.room.CREATE_SPACE_SHORTCUT,
|
||||
roomId,
|
||||
});
|
||||
}
|
||||
|
||||
function deleteSpaceShortcut(roomId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.room.DELETE_SPACE_SHORTCUT,
|
||||
roomId,
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
join, leave,
|
||||
createDM, createRoom,
|
||||
invite, kick, ban, unban,
|
||||
setPowerLevel,
|
||||
createSpaceShortcut, deleteSpaceShortcut,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue