Reset realm and character lists when switching servers

Add reset() to RealmScreen and CharacterScreen to clear stale selection
state. Clear auth handler realm list on reconnect. Reset both screens
when going back to login or back to realm selection, so switching
servers shows fresh data instead of stale lists from the previous
connection.
This commit is contained in:
Kelsi 2026-02-14 19:24:31 -08:00
parent 388db59463
commit 7f9439d774
4 changed files with 44 additions and 0 deletions

View file

@ -34,6 +34,9 @@ bool AuthHandler::connect(const std::string& host, uint16_t port) {
const std::string hostTrimmed = trimHost(host);
LOG_INFO("Connecting to auth server: ", hostTrimmed, ":", port);
// Clear stale realm list from previous connection
realms.clear();
socket = std::make_unique<network::TCPSocket>();
// Set up packet callback