From a46bf4e2deaabea7933e5e152e3f3e795c64a58c Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sun, 25 Jan 2015 12:53:19 -0500 Subject: [PATCH] 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. --- js/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/client.js b/js/client.js index 954733411..e4a57d73a 100644 --- a/js/client.js +++ b/js/client.js @@ -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