]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
keep tweaking/refining
authorgg <chown_tee@proton.me>
Wed, 14 Jan 2026 18:00:23 +0000 (13:00 -0500)
committergg <chown_tee@proton.me>
Wed, 14 Jan 2026 18:00:23 +0000 (13:00 -0500)
src/MainWindow.cpp
src/utils/nodes.cpp
src/utils/nodes.h

index d96ea9757db676e0ca4cbd259443fd7a02ddd520..fe200e3b76d4f21c5a6c21d17d4ca7595c22fa23 100644 (file)
@@ -614,7 +614,7 @@ void MainWindow::initOffline() {
 
     connect(m_updateNetworkInfoAction, &QAction::triggered, this, [this]() {
         if (!m_wallet) return;
-        this->setStatusText(tr("Fetching network info..."));
+        this->setStatusText(tr("Scanning (Fetching network info)..."));
         m_wallet->updateNetworkStatus();
     });
 
index 4b55fb92fa3a4e0ccf2055f1077fc7c92bf2f4af..6611d76d48ccf8e1bfbdaf377883662bf4ded1eb 100644 (file)
@@ -438,6 +438,10 @@ void Nodes::setCustomNodes(const QList<FeatherNode> &nodes) {
 
 void Nodes::onWalletRefreshed() {
     if (conf()->get(Config::proxy) == Config::Proxy::Tor && conf()->get(Config::torPrivacyLevel).toInt() == Config::allTorExceptInitSync) {
+        // Privacy switch already triggered this session, don't repeat
+        if (m_privacySwitchDone)
+            return;
+
         // Don't reconnect if we're connected to a local node (traffic will not be routed through Tor)
         if (m_connection.isLocal())
             return;
@@ -446,9 +450,10 @@ void Nodes::onWalletRefreshed() {
         if (m_connection.isOnion())
             return;
 
-        // If want onion node but aren't connected to one, reconnect used to blindly fire.
-        // We should check if we actually intend to switch.
+        // If want onion node but aren't connected to one, trigger the switch
         if (this->useOnionNodes()) {
+            qInfo() << "Privacy switch: switching from clearnet to onion after initial sync";
+            m_privacySwitchDone = true;
             this->autoConnect(true);
         }
     }
index 2cc06b33a364c9d45b57e2d89d2c071a2e9ca92d..1c916998f1a59264633be5a1c4c049025d28615a 100644 (file)
@@ -193,6 +193,7 @@ private:
     bool m_enableAutoconnect = true;
 
     bool m_allowConnection = false;
+    bool m_privacySwitchDone = false;  // Tracks if allTorExceptInitSync switch has fired
 
     FeatherNode pickEligibleNode();