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 {
176
176
177
177
@ViewBuilder
178
178
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 {
180
187
AnyView (
181
188
Image ( systemName: " network " )
182
- . foregroundStyle ( . green)
189
+ . foregroundStyle ( isKyotoConnected ? . green : . secondary )
183
190
)
184
191
} else {
192
+ let ok = isKyotoConnected || hasSyncActivity
185
193
AnyView (
186
- Image ( systemName: " network.slash " )
187
- . foregroundStyle ( . red)
194
+ Image ( systemName: ok ? " network " : " network.slash " )
195
+ . foregroundStyle ( ok ? . green : . red)
188
196
)
189
197
}
190
198
}
You can’t perform that action at this time.
0 commit comments