Merge pull request #2182

73a3549 WalletManager: non-blocking mining status updates (xiphon)
This commit is contained in:
luigi1111
2019-06-05 22:33:57 -05:00
3 changed files with 22 additions and 3 deletions

View File

@@ -258,14 +258,18 @@ Rectangle {
}
}
function update() {
function onMiningStatus(isMining) {
var daemonReady = walletManager.isDaemonLocal(appWindow.currentDaemonAddress) && appWindow.daemonSynced
appWindow.isMining = walletManager.isMining()
appWindow.isMining = isMining;
updateStatusText()
startSoloMinerButton.enabled = !appWindow.isMining && daemonReady
stopSoloMinerButton.enabled = !startSoloMinerButton.enabled && daemonReady
}
function update() {
walletManager.miningStatusAsync();
}
MoneroComponents.StandardDialog {
id: errorPopup
cancelVisible: false
@@ -286,4 +290,8 @@ Rectangle {
function onPageClosed() {
timer.running = false
}
Component.onCompleted: {
walletManager.miningStatus.connect(onMiningStatus);
}
}