Skip to content

Commit e3e7b4c

Browse files
committed
qml: wire up logic for block clock connecting state
1 parent 15df21c commit e3e7b4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/qml/components/BlockClock.qml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Item {
2020
property alias headerSize: mainText.font.pixelSize
2121
property alias subText: subText.text
2222
property int headerSize: 32
23+
property bool connected: nodeModel.numOutboundPeers > 0
2324
property bool synced: nodeModel.verificationProgress > 0.999
2425
property bool paused: false
25-
property bool conns: true
2626

2727
BlockClockDial {
2828
id: dial
@@ -85,7 +85,7 @@ Item {
8585

8686
states: [
8787
State {
88-
name: "IBD"; when: !synced && !paused && conns
88+
name: "IBD"; when: !synced && !paused && connected
8989
PropertyChanges {
9090
target: root
9191
header: Math.round(nodeModel.verificationProgress * 100) + "%"
@@ -94,7 +94,7 @@ Item {
9494
},
9595

9696
State {
97-
name: "BLOCKCLOCK"; when: synced && !paused && conns
97+
name: "BLOCKCLOCK"; when: synced && !paused && connected
9898
PropertyChanges {
9999
target: root
100100
header: Number(nodeModel.blockTipHeight).toLocaleString(Qt.locale(), 'f', 0)
@@ -121,7 +121,7 @@ Item {
121121
},
122122

123123
State {
124-
name: "CONNECTING"; when: !paused && !conns
124+
name: "CONNECTING"; when: !paused && !connected
125125
PropertyChanges {
126126
target: root
127127
header: "Connecting"

0 commit comments

Comments
 (0)