mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Don't go & load the first room if we've already been told to load a different one.
This commit is contained in:
parent
36b1280f0c
commit
e0673eee29
@ -173,6 +173,7 @@ module.exports = {
|
||||
var cli = MatrixClientPeg.get();
|
||||
var self = this;
|
||||
cli.on('syncComplete', function() {
|
||||
if (!self.state.currentRoom) {
|
||||
var firstRoom = null;
|
||||
if (cli.getRooms() && cli.getRooms().length) {
|
||||
firstRoom = RoomListSorter.mostRecentActivityFirst(
|
||||
@ -181,6 +182,9 @@ module.exports = {
|
||||
}
|
||||
self.setState({ready: true, currentRoom: firstRoom});
|
||||
self.notifyNewScreen('room/'+firstRoom);
|
||||
} else {
|
||||
self.setState({ready: true});
|
||||
}
|
||||
dis.dispatch({action: 'focus_composer'});
|
||||
});
|
||||
cli.on('Call.incoming', function(call) {
|
||||
|
Loading…
Reference in New Issue
Block a user