diff options
-rw-r--r-- | app/Radio.qml | 43 | ||||
-rw-r--r-- | app/api/Binding.qml | 1 |
2 files changed, 25 insertions, 19 deletions
diff --git a/app/Radio.qml b/app/Radio.qml index 7b7797a..78bab94 100644 --- a/app/Radio.qml +++ b/app/Radio.qml @@ -181,33 +181,38 @@ ApplicationWindow { } ImageButton { + id: scanDownBtn offImage: './images/AGL_MediaPlayer_BackArrow.svg' - Timer { - running: parent.pressed - triggeredOnStart: true - interval: 100 - repeat: true - onTriggered: { - radio.scanDown() - scanLabel.color = '#59FF7F' + states: [ + State { + when: radio.state === radio.activeState + PropertyChanges { + target: scanDownBtn + onClicked: { + radio.scanDown() + scanLabel.color = '#59FF7F' + } + } } - } + ] } ImageButton { + id: scanUpBtn offImage: './images/AGL_MediaPlayer_ForwardArrow.svg' - Timer { - running: parent.pressed - triggeredOnStart: true - interval: 100 - repeat: true - onTriggered: { - radio.scanUp() - scanLabel.color = '#59FF7F' + states: [ + State { + when: radio.state === radio.activeState + PropertyChanges { + target: scanUpBtn + onClicked: { + radio.scanUp() + scanLabel.color = '#59FF7F' + } + } } - } + ] } - } } } diff --git a/app/api/Binding.qml b/app/api/Binding.qml index 7750452..ee83bb5 100644 --- a/app/api/Binding.qml +++ b/app/api/Binding.qml @@ -64,6 +64,7 @@ WebSocket { sendSocketMessage("scan_stop", 'None') scanningState = stoppedState sendSocketMessage("frequency", { value: frequency }) + root.stationFound() } else { // This update was from scanning, clear state scanningFreqUpdate = false |