From c2e92045d07fa121552c2b82f6fec448dd19ea3f Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 22 Jul 2015 21:37:46 -0700 Subject: [PATCH] Don't announce that we've entered the null room on login if there are no rooms. --- src/controllers/pages/MatrixChat.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/pages/MatrixChat.js b/src/controllers/pages/MatrixChat.js index d43fd1e4..c3fe5590 100644 --- a/src/controllers/pages/MatrixChat.js +++ b/src/controllers/pages/MatrixChat.js @@ -195,9 +195,11 @@ module.exports = { firstRoom = RoomListSorter.mostRecentActivityFirst( cli.getRooms() )[0].roomId; + self.setState({ready: true, currentRoom: firstRoom}); + self.notifyNewScreen('room/'+firstRoom); + } else { + self.setState({ready: true}); } - self.setState({ready: true, currentRoom: firstRoom}); - self.notifyNewScreen('room/'+firstRoom); } else { self.setState({ready: true}); }