Open Rooms room when it fits

By default, the Join Room window is only auto-opened on startup if
it fits. This changes it so that if it doesn't fit on startup but
the window is later resized to fit, the Join Room window will
auto-open if it hasn't been opened yet.

In addition to behaving more expectedly, this deals with an issue
in NW.js in Windows where maximizing doesn't happen before PS
loads.
This commit is contained in:
Guangcong Luo
2015-01-25 12:53:19 -05:00
parent aea0957df8
commit a46bf4e2de

View File

@@ -1111,6 +1111,9 @@
this.fixedWidth = true;
}
}
if (!app.roomsFirstOpen && !this.down && $(window).width() >= 916 && document.location.hostname === 'play.pokemonshowdown.com') {
this.addRoom('rooms');
}
this.updateLayout();
},
// the currently active room