mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 15:00:30 +03:00
Add RoomSettings comp
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
8eda0aeab3
commit
5777c1ab27
20 changed files with 306 additions and 25 deletions
|
|
@ -11,6 +11,7 @@ class Navigation extends EventEmitter {
|
|||
this.selectedSpacePath = [cons.tabs.HOME];
|
||||
|
||||
this.selectedRoomId = null;
|
||||
this.isRoomSettings = false;
|
||||
this.recentRooms = [];
|
||||
|
||||
this.isRawModalVisible = false;
|
||||
|
|
@ -77,6 +78,10 @@ class Navigation extends EventEmitter {
|
|||
this.removeRecentRoom(prevSelectedRoomId);
|
||||
this.addRecentRoom(prevSelectedRoomId);
|
||||
this.removeRecentRoom(this.selectedRoomId);
|
||||
if (this.isRoomSettings) {
|
||||
this.isRoomSettings = !this.isRoomSettings;
|
||||
this.emit(cons.events.navigation.ROOM_SETTINGS_TOGGLED, this.isRoomSettings);
|
||||
}
|
||||
this.emit(
|
||||
cons.events.navigation.ROOM_SELECTED,
|
||||
this.selectedRoomId,
|
||||
|
|
@ -84,6 +89,10 @@ class Navigation extends EventEmitter {
|
|||
action.eventId,
|
||||
);
|
||||
},
|
||||
[cons.actions.navigation.TOGGLE_ROOM_SETTINGS]: () => {
|
||||
this.isRoomSettings = !this.isRoomSettings;
|
||||
this.emit(cons.events.navigation.ROOM_SETTINGS_TOGGLED, this.isRoomSettings);
|
||||
},
|
||||
[cons.actions.navigation.OPEN_INVITE_LIST]: () => {
|
||||
this.emit(cons.events.navigation.INVITE_LIST_OPENED);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue