mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-01 07:10:46 -05:00
Refresh Watch Battle when clicking Watch Battle
If Watch Battle is open, trying to open it again will refresh it in addition to focusing it. Previously, it would only refresh if it's been over 60 seconds since the previous refresh.
This commit is contained in:
@@ -157,6 +157,10 @@
|
||||
this.$('button[name=refresh]').focus();
|
||||
this.$el.scrollTop(prevPos);
|
||||
},
|
||||
rejoin: function () {
|
||||
app.send('/cmd roomlist');
|
||||
this.lastUpdate = new Date().getTime();
|
||||
},
|
||||
update: function (data) {
|
||||
if (!data && !this.data) {
|
||||
if (app.isDisconnected) {
|
||||
|
||||
@@ -1169,6 +1169,7 @@
|
||||
joinRoom: function (id, type, nojoin) {
|
||||
if (this.rooms[id]) {
|
||||
this.focusRoom(id);
|
||||
if (this.rooms[id].rejoin) this.rooms[id].rejoin();
|
||||
return this.rooms[id];
|
||||
}
|
||||
if (id.substr(0, 11) === 'battle-gen5' && !Tools.loadedSpriteData['bw']) Tools.loadSpriteData('bw');
|
||||
|
||||
Reference in New Issue
Block a user