]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
duplicate code?
authorgg <chown_tee@proton.me>
Sun, 18 Jan 2026 22:49:27 +0000 (17:49 -0500)
committergg <chown_tee@proton.me>
Sun, 18 Jan 2026 22:49:27 +0000 (17:49 -0500)
src/MainWindow.cpp

index f0db0ff47f285597d1ad362ed832f92fb779722a..496a51bb4fe0d4050ce0bc13428b93ec4a663607 100644 (file)
@@ -884,6 +884,13 @@ void MainWindow::updateStatusToolTip() {
 void MainWindow::updateSyncStatusToolTip() {
     if (!m_wallet) return;
 
+    // Throttle updates to 1s to prevent overwhelming the event loop (e.g. m_updateBytes timer)
+    static QDateTime lastUpdate = QDateTime::currentDateTime();
+    if (lastUpdate.msecsTo(QDateTime::currentDateTime()) < 1000) {
+        return;
+    }
+    lastUpdate = QDateTime::currentDateTime();
+
     bool isPaused = conf()->get(Config::syncPaused).toBool();
 
     quint64 walletHeight = m_wallet->blockChainHeight();
@@ -1975,14 +1982,6 @@ void MainWindow::updateNetStats() {
 
     bool showTraffic = trafficCooldown > 0;
 
-    // Update tooltip
-    QString tooltip = "";
-    if (m_lastNetInfoUpdate.isValid()) {
-        qint64 secs = m_lastNetInfoUpdate.secsTo(QDateTime::currentDateTime());
-        tooltip = tr("Last updated net info: %1 seconds ago").arg(secs);
-    }
-    m_statusLabelStatus->setToolTip(tooltip);
-
     if (!m_wallet || m_wallet->connectionStatus() == Wallet::ConnectionStatus_Disconnected
                        || (m_wallet->connectionStatus() == Wallet::ConnectionStatus_Synchronized && !m_coinsRefreshing && !showTraffic))
     {