aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Brydolf <jacob@rabash.se>2016-09-30 12:12:26 +0200
committerJacob Brydolf <jacob@rabash.se>2016-09-30 12:12:26 +0200
commitf0d2e5837635b01736d0a5bceddda61c23142c2b (patch)
tree9c71f045e0b8b90b1a23e5398a6a2f51bc19de75
parentad2943fb204112ec64609b7c1e00df946664e26d (diff)
downloadmonzero-gui-f0d2e5837635b01736d0a5bceddda61c23142c2b.tar.gz
monzero-gui-f0d2e5837635b01736d0a5bceddda61c23142c2b.tar.xz
monzero-gui-f0d2e5837635b01736d0a5bceddda61c23142c2b.zip
make splash less resource intensive
-rw-r--r--main.qml12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.qml b/main.qml
index 85350e39..0e198084 100644
--- a/main.qml
+++ b/main.qml
@@ -52,7 +52,7 @@ ApplicationWindow {
property var currentWallet;
property var transaction;
property alias password : passwordDialog.password
-
+ property int splashCounter: 0
function altKeyReleased() { ctrlPressed = false; }
@@ -225,9 +225,13 @@ ApplicationWindow {
function onWalletNewBlock(blockHeight) {
if (splash.visible) {
- var progressText = qsTr("Synchronizing blocks %1/%2").arg(blockHeight.toFixed(0)).arg(currentWallet.daemonBlockChainHeight().toFixed(0));
- console.log("Progress text: " + progressText);
- splash.heightProgressText = progressText
+ var currHeight = blockHeight.toFixed(0)
+ if(currHeight > splashCounter + 1000){
+ splashCounter = currHeight
+ var progressText = qsTr("Synchronizing blocks %1/%2").arg(currHeight).arg(currentWallet.daemonBlockChainHeight().toFixed(0));
+ console.log("Progress text: " + progressText);
+ splash.heightProgressText = progressText
+ }
}
}