From cc4815a3db61d00db5ec1ebfc4f801bfe0f6872d Mon Sep 17 00:00:00 2001 From: selsta Date: Sat, 23 Apr 2022 07:13:17 +0200 Subject: [PATCH] Mining: only update mining status when page is open --- pages/Mining.qml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pages/Mining.qml b/pages/Mining.qml index e642005c..68aeffec 100644 --- a/pages/Mining.qml +++ b/pages/Mining.qml @@ -575,20 +575,12 @@ Rectangle { Timer { id: timer - interval: 2000; running: false; repeat: true + interval: 2000 + running: middlePanel.advancedView.state === "Mining" && middlePanel.state === "Advanced" && currentWallet !== undefined && (!persistentSettings.useRemoteNode || persistentSettings.allowRemoteNodeMining) + repeat: true onTriggered: update() } - function onPageCompleted() { - console.log("Mining page loaded"); - update() - timer.running = !persistentSettings.useRemoteNode || persistentSettings.allowRemoteNodeMining - } - - function onPageClosed() { - timer.running = false - } - function startP2PoolLocal() { var noSync = false; var customDaemonArgs = persistentSettings.daemonFlags.toLowerCase();