From e7d11f620a6694395934a72f8053350ed5a057ad Mon Sep 17 00:00:00 2001 From: DanS Date: Sat, 13 Jun 2026 12:45:50 -0500 Subject: [PATCH] fix(network): populate the peer count on connect, not just on the Peers tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a fresh open the status-bar peer count stayed 0 until the Network tab was opened. refreshData() — the one-shot refresh run on connect / warmup-complete / unlock — only refreshed peers when the active tab was Peers, so on any other tab nothing populated the count until a tab visit forced it. Refresh peers unconditionally there so the count appears right after connecting; the periodic 20s Peers timer (all tabs) keeps it current after that. Co-Authored-By: Claude Opus 4.8 --- src/app_network.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app_network.cpp b/src/app_network.cpp index c8bdd87..0c4d278 100644 --- a/src/app_network.cpp +++ b/src/app_network.cpp @@ -1109,8 +1109,10 @@ void App::refreshData() else if (!addressRefreshNeeded && walletDataPage && shouldRefreshRecentTransactions()) refreshRecentTransactionData(); - if (current_page_ == ui::NavPage::Peers) - refreshPeerInfo(); + // Always refresh peers here — refreshData() only runs on one-shot transitions (connect, + // warmup-complete, unlock), so this populates the status-bar peer count immediately on open + // regardless of the active tab. Ongoing updates come from the periodic Peers timer. + refreshPeerInfo(); if (!state_.encryption_state_known && !network_refresh_.jobInProgress(services::NetworkRefreshService::Job::ConnectionInit)) {