mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
Merge pull request #1867
600c5a7
mining: optimize update function, improve performance (mmbyday)
This commit is contained in:
commit
4b2df0418a
3 changed files with 7 additions and 6 deletions
3
main.qml
3
main.qml
|
@ -399,6 +399,9 @@ ApplicationWindow {
|
|||
if (!walletInitialized) {
|
||||
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
||||
walletInitialized = true
|
||||
|
||||
// check if daemon was already mining and add mining logo if true
|
||||
middlePanel.miningView.update();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
function updateStatusText() {
|
||||
if (walletManager.isMining()) {
|
||||
if (appWindow.isMining) {
|
||||
statusText.text = qsTr("Mining at %1 H/s").arg(walletManager.miningHashRate()) + translationManager.emptyString;
|
||||
}
|
||||
else {
|
||||
|
@ -238,10 +238,10 @@ Rectangle {
|
|||
}
|
||||
|
||||
function update() {
|
||||
updateStatusText()
|
||||
startSoloMinerButton.enabled = !walletManager.isMining()
|
||||
stopSoloMinerButton.enabled = !startSoloMinerButton.enabled
|
||||
appWindow.isMining = walletManager.isMining()
|
||||
updateStatusText()
|
||||
startSoloMinerButton.enabled = !appWindow.isMining
|
||||
stopSoloMinerButton.enabled = !startSoloMinerButton.enabled
|
||||
}
|
||||
|
||||
MoneroComponents.StandardDialog {
|
||||
|
|
|
@ -688,8 +688,6 @@ Rectangle {
|
|||
// Light wallet is always ready
|
||||
pageRoot.enabled = true;
|
||||
root.warningContent = "";
|
||||
// check if daemon was already mining and add mining logo if true
|
||||
middlePanel.miningView.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue