Fix space add options visible in home
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
6c4085398e
commit
d3ddbc0c72
3 changed files with 2 additions and 5 deletions
|
@ -4,7 +4,6 @@ import './Drawer.scss';
|
||||||
import initMatrix from '../../../client/initMatrix';
|
import initMatrix from '../../../client/initMatrix';
|
||||||
import cons from '../../../client/state/cons';
|
import cons from '../../../client/state/cons';
|
||||||
import navigation from '../../../client/state/navigation';
|
import navigation from '../../../client/state/navigation';
|
||||||
import { selectTab, selectSpace } from '../../../client/action/navigation';
|
|
||||||
|
|
||||||
import Text from '../../atoms/text/Text';
|
import Text from '../../atoms/text/Text';
|
||||||
import ScrollView from '../../atoms/scroll/ScrollView';
|
import ScrollView from '../../atoms/scroll/ScrollView';
|
||||||
|
@ -52,7 +51,7 @@ function Drawer() {
|
||||||
<div className="drawer">
|
<div className="drawer">
|
||||||
<DrawerHeader selectedTab={selectedTab} spaceId={spaceId} />
|
<DrawerHeader selectedTab={selectedTab} spaceId={spaceId} />
|
||||||
<div className="drawer__content-wrapper">
|
<div className="drawer__content-wrapper">
|
||||||
{selectedTab !== cons.tabs.DIRECTS && <DrawerBreadcrumb spaceId={spaceId} />}
|
{navigation.selectedSpacePath.length > 1 && <DrawerBreadcrumb spaceId={spaceId} />}
|
||||||
<div className="rooms__wrapper">
|
<div className="rooms__wrapper">
|
||||||
<ScrollView ref={scrollRef} autoHide>
|
<ScrollView ref={scrollRef} autoHide>
|
||||||
<div className="rooms-container">
|
<div className="rooms-container">
|
||||||
|
|
|
@ -48,8 +48,6 @@ function DrawerBreadcrumb({ spaceId }) {
|
||||||
};
|
};
|
||||||
}, [spaceId]);
|
}, [spaceId]);
|
||||||
|
|
||||||
if (spacePath.length === 1) return null;
|
|
||||||
|
|
||||||
function getHomeNotiExcept(childId) {
|
function getHomeNotiExcept(childId) {
|
||||||
const orphans = roomList.getOrphans();
|
const orphans = roomList.getOrphans();
|
||||||
const childIndex = orphans.indexOf(childId);
|
const childIndex = orphans.indexOf(childId);
|
||||||
|
|
|
@ -69,7 +69,7 @@ class Navigation extends EventEmitter {
|
||||||
},
|
},
|
||||||
[cons.actions.navigation.SELECT_SPACE]: () => {
|
[cons.actions.navigation.SELECT_SPACE]: () => {
|
||||||
this._setSpacePath(action.roomId);
|
this._setSpacePath(action.roomId);
|
||||||
this.selectedSpaceId = action.roomId;
|
this.selectedSpaceId = action.roomId === cons.tabs.HOME ? null : action.roomId;
|
||||||
this.emit(cons.events.navigation.SPACE_SELECTED, this.selectedSpaceId);
|
this.emit(cons.events.navigation.SPACE_SELECTED, this.selectedSpaceId);
|
||||||
},
|
},
|
||||||
[cons.actions.navigation.SELECT_ROOM]: () => {
|
[cons.actions.navigation.SELECT_ROOM]: () => {
|
||||||
|
|
Loading…
Reference in a new issue