From 67dcb3a448b923254cc1516e54be684abec70cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 25 Mar 2021 20:51:21 +0100 Subject: [PATCH] If no roomId was saved go to space home MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/stores/SpaceStore.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/stores/SpaceStore.tsx b/src/stores/SpaceStore.tsx index 20223cb8a6..063256f421 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -125,7 +125,16 @@ export class SpaceStoreClass extends AsyncStoreWithClient { action: "view_room", room_id: roomId, }); - } // TODO: Handle else + } else { + if (space) { + defaultDispatcher.dispatch({ + action: "view_room", + room_id: space.roomId, + }); + } else { + // TODO: Switch to first room in the RoomList + } + } // persist space selected if (space) {