]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
wip status tooltip
authorgg <chown_tee@proton.me>
Sun, 18 Jan 2026 22:00:54 +0000 (17:00 -0500)
committergg <chown_tee@proton.me>
Sun, 18 Jan 2026 22:00:57 +0000 (17:00 -0500)
src/MainWindow.cpp

index f0f0258b8d14c34c538b412c955b89898523262a..6db6671dfa0cc574c2b5d1350f647d80e7df4cb9 100644 (file)
@@ -884,37 +884,23 @@ void MainWindow::updateStatusToolTip() {
 void MainWindow::updateSyncStatusToolTip() {
     if (!m_wallet) return;
 
-    quint64 walletHeight = m_wallet->blockChainHeight();
-    quint64 targetHeight = m_wallet->daemonBlockChainTargetHeight();
+    bool isPaused = conf()->get(Config::syncPaused).toBool();
 
-    // 1. Calculate real lag (if connected)
-    quint64 blocksBehind = 0;
-    if (targetHeight > walletHeight) {
-        blocksBehind = targetHeight - walletHeight;
-    }
+    quint64 walletHeight = m_wallet->blockChainHeight();
+    quint64 daemonHeight = m_wallet->daemonBlockChainHeight();
+    quint64 blocksBehind = daemonHeigh - walletHeight;
 
-    // 2. Calculate estimate lag (if paused or offline)
-    // Only use time-estimation if we don't have a live connection
-    bool isPaused = conf()->get(Config::syncPaused).toBool();
+    // Use time-estimation if we don't have a live connection
     if (isPaused || m_wallet->connectionStatus() == Wallet::ConnectionStatus_Disconnected) {
-        // Only estimate if we deviate from the cached target, OR if target is unknown
-        if (targetHeight == 0 || targetHeight > walletHeight) {
             QDateTime lastSync = m_wallet->lastSyncTime();
             if (lastSync.isValid()) {
                 qint64 secs = lastSync.secsTo(QDateTime::currentDateTime());
                 if (secs > 0) blocksBehind = secs / 120; // 120s per block
-            }
         }
     }
 
-    // 3. Build status tooltip
-    QString tooltip = tr("Wallet Height: %1").arg(QLocale().toString(walletHeight));
-
-    // Only show Network Tip if we are actually connected
-    if (!isPaused && m_wallet->connectionStatus() == Wallet::ConnectionStatus_Synchronized) {
-        if (targetHeight > 0)
-            tooltip += tr(" | Network Tip: %1").arg(QLocale().toString(targetHeight));
-    }
+    // Build tooltip
+    QString tooltip = tr("Daemon Height: %1").arg(QLocale().toString(daemonHeight));
 
     if (conf()->get(Config::lastNetInfoUpdate).toULongLong() > 0) {
         tooltip += tr("\nLast network update: %1").arg(