From: gg Date: Tue, 13 Jan 2026 02:35:14 +0000 (-0500) Subject: place disconnectCurrentNode outside connectToNode X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=d9c7caeb7ebb3d55e830f7650961291ae276f2c0;p=gamesguru%2Ffeather.git place disconnectCurrentNode outside connectToNode --- diff --git a/src/utils/nodes.cpp b/src/utils/nodes.cpp index c4e09d5c..12bd749a 100644 --- a/src/utils/nodes.cpp +++ b/src/utils/nodes.cpp @@ -207,21 +207,6 @@ void Nodes::connectToNode(const FeatherNode &node) { if (!node.isValid()) { return; } -} - -void Nodes::disconnectCurrentNode() { - if (!m_wallet) return; - - // Stop any ongoing connection attempt - m_connection.isActive = false; - m_connection.isConnecting = false; - - // Connect to empty "node" effectively disconnects - m_wallet->initAsync("", false, 0); - - this->resetLocalState(); - this->updateModels(); -} if (conf()->get(Config::offlineMode).toBool()) { return; @@ -263,6 +248,20 @@ void Nodes::disconnectCurrentNode() { this->updateModels(); } +void Nodes::disconnectCurrentNode() { + if (!m_wallet) return; + + // Stop any ongoing connection attempt + m_connection.isActive = false; + m_connection.isConnecting = false; + + // Connect to empty "node" effectively disconnects + m_wallet->initAsync("", false, 0); + + this->resetLocalState(); + this->updateModels(); +} + void Nodes::autoConnect(bool forceReconnect) { if (!m_wallet) { return;