mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
refectored Drawer component and added Postie
This commit is contained in:
parent
8996b562bc
commit
b5dfc337ec
10 changed files with 336 additions and 191 deletions
|
|
@ -6,7 +6,7 @@ class Navigation extends EventEmitter {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.activeTab = 'channels';
|
||||
this.activeTab = 'home';
|
||||
this.activeRoomId = null;
|
||||
this.isPeopleDrawerVisible = true;
|
||||
}
|
||||
|
|
@ -26,8 +26,9 @@ class Navigation extends EventEmitter {
|
|||
this.emit(cons.events.navigation.TAB_CHANGED, this.activeTab);
|
||||
},
|
||||
[cons.actions.navigation.SELECT_ROOM]: () => {
|
||||
const prevActiveRoomId = this.activeRoomId;
|
||||
this.activeRoomId = action.roomId;
|
||||
this.emit(cons.events.navigation.ROOM_SELECTED, this.activeRoomId);
|
||||
this.emit(cons.events.navigation.ROOM_SELECTED, this.activeRoomId, prevActiveRoomId);
|
||||
},
|
||||
[cons.actions.navigation.TOGGLE_PEOPLE_DRAWER]: () => {
|
||||
this.isPeopleDrawerVisible = !this.isPeopleDrawerVisible;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue