From d3ddbc0c727392c34c8a292135b4dc647a6b9296 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 23 Feb 2022 19:48:24 +0530 Subject: [PATCH] Fix space add options visible in home Signed-off-by: Ajay Bura --- src/app/organisms/navigation/Drawer.jsx | 3 +-- src/app/organisms/navigation/DrawerBreadcrumb.jsx | 2 -- src/client/state/navigation.js | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/app/organisms/navigation/Drawer.jsx b/src/app/organisms/navigation/Drawer.jsx index e5b9a254..10b047f0 100644 --- a/src/app/organisms/navigation/Drawer.jsx +++ b/src/app/organisms/navigation/Drawer.jsx @@ -4,7 +4,6 @@ import './Drawer.scss'; import initMatrix from '../../../client/initMatrix'; import cons from '../../../client/state/cons'; import navigation from '../../../client/state/navigation'; -import { selectTab, selectSpace } from '../../../client/action/navigation'; import Text from '../../atoms/text/Text'; import ScrollView from '../../atoms/scroll/ScrollView'; @@ -52,7 +51,7 @@ function Drawer() {
- {selectedTab !== cons.tabs.DIRECTS && } + {navigation.selectedSpacePath.length > 1 && }
diff --git a/src/app/organisms/navigation/DrawerBreadcrumb.jsx b/src/app/organisms/navigation/DrawerBreadcrumb.jsx index c2218274..61d8d081 100644 --- a/src/app/organisms/navigation/DrawerBreadcrumb.jsx +++ b/src/app/organisms/navigation/DrawerBreadcrumb.jsx @@ -48,8 +48,6 @@ function DrawerBreadcrumb({ spaceId }) { }; }, [spaceId]); - if (spacePath.length === 1) return null; - function getHomeNotiExcept(childId) { const orphans = roomList.getOrphans(); const childIndex = orphans.indexOf(childId); diff --git a/src/client/state/navigation.js b/src/client/state/navigation.js index 91fca2da..ca083956 100644 --- a/src/client/state/navigation.js +++ b/src/client/state/navigation.js @@ -69,7 +69,7 @@ class Navigation extends EventEmitter { }, [cons.actions.navigation.SELECT_SPACE]: () => { 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); }, [cons.actions.navigation.SELECT_ROOM]: () => {