Merge pull request #58 from Jaqueeee/fix-splash

make splash less resource intensive
This commit is contained in:
Ilya Kitaev 2016-09-30 21:12:20 +03:00 committed by GitHub
commit af7f41faa4

View file

@ -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
}
}
}