diff --git a/play.pokemonshowdown.com/src/panel-chat.tsx b/play.pokemonshowdown.com/src/panel-chat.tsx index 4869a7bc97..c448719a45 100644 --- a/play.pokemonshowdown.com/src/panel-chat.tsx +++ b/play.pokemonshowdown.com/src/panel-chat.tsx @@ -662,6 +662,8 @@ export class ChatRoom extends PSRoom { const index = this.onlineUsers.findIndex(([curUserid]) => curUserid === userid); if (index >= 0) { this.onlineUsers[index] = [userid, username]; + // Re-sort in case the idle state (@!) changed + this.sortOnlineUsers(); } else { this.userCount++; this.onlineUsers.push([userid, username]); @@ -687,11 +689,6 @@ export class ChatRoom extends PSRoom { } handleJoinLeave(action: 'join' | 'leave', name: string, silent: boolean) { - if (action === 'join') { - this.addUser(name); - } else if (action === 'leave') { - this.removeUser(name); - } const showjoins = PS.prefs.showjoins?.[PS.server.id]; if (!(showjoins?.[this.id] ?? showjoins?.['global'] ?? !silent)) return;