forked from Public/monero-gui
WalletManager: non-blocking mining status updates
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user