refectored Drawer component and added Postie

This commit is contained in:
unknown 2021-08-30 21:12:24 +05:30
parent 8996b562bc
commit b5dfc337ec
10 changed files with 336 additions and 191 deletions

View file

@ -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;