File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
BDKSwiftExampleWallet/View/Home Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -176,15 +176,23 @@ struct ActivityHomeHeaderView: View {
176176
177177 @ViewBuilder
178178 private func networkConnectionIndicator( ) -> some View {
179- if isKyotoConnected {
179+ // Tri-state indicator for Kyoto peer connectivity
180+ // - Green: actively connected OR showing sync activity
181+ // - Gray (secondary): synced but not currently connected
182+ // - Red: not synced, no activity, and not connected
183+ let isFullySynced = walletSyncState == . synced
184+ let hasSyncActivity = ( progress > 0 ) || ( currentBlockHeight > 0 )
185+
186+ if isFullySynced {
180187 AnyView (
181188 Image ( systemName: " network " )
182- . foregroundStyle ( . green)
189+ . foregroundStyle ( isKyotoConnected ? . green : . secondary )
183190 )
184191 } else {
192+ let ok = isKyotoConnected || hasSyncActivity
185193 AnyView (
186- Image ( systemName: " network.slash " )
187- . foregroundStyle ( . red)
194+ Image ( systemName: ok ? " network " : " network.slash " )
195+ . foregroundStyle ( ok ? . green : . red)
188196 )
189197 }
190198 }
You can’t perform that action at this time.
0 commit comments