diff --git a/src/ui/windows/network_tab.cpp b/src/ui/windows/network_tab.cpp index b12de3a..1672066 100644 --- a/src/ui/windows/network_tab.cpp +++ b/src/ui/windows/network_tab.cpp @@ -10,6 +10,7 @@ #include "../../util/i18n.h" #include "../../util/lite_server_probe.h" #include "../../wallet/lite_connection_service.h" +#include "../../wallet/lite_wallet_controller.h" #include "../theme.h" #include "../layout.h" #include "../material/type.h" @@ -72,6 +73,11 @@ void RenderLiteNetworkTab(App* app) auto applyAndRebuild = [&]() { st->save(); app->rebuildLiteWallet(/*force=*/true); }; auto pinServer = [&](const std::string& url) { + // Already pinned AND connected to exactly this server: nothing to switch (the click used to tear the + // controller down and reopen). A wallet that failed over to another server still reconnects, which + // retries the pinned one. + auto* lite = app->liteWallet(); + if (!randomMode && url == sticky && lite && lite->walletOpen() && lite->connectedServerUrl() == url) return; st->setLiteServerSelectionMode(LiteMode::Sticky); st->setLiteStickyServerUrl(url); applyAndRebuild();