From 44b72eaff2c877792d9cae3a2c4be2aba3018320 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 12:23:01 +0200 Subject: [PATCH] refresh history updates --- main.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.qml b/main.qml index 93ced945..9e867244 100644 --- a/main.qml +++ b/main.qml @@ -442,9 +442,6 @@ ApplicationWindow { console.log("Saving wallet after first refresh"); currentWallet.store() isNewWallet = false - - // Update History - currentWallet.history.refresh(); } // recovering from seed is finished after first refresh @@ -453,6 +450,10 @@ ApplicationWindow { } } + // Update history on every refresh if it's empty + if(currentWallet.history.count == 0) + currentWallet.history.refresh() + onWalletUpdate(); } @@ -512,7 +513,8 @@ ApplicationWindow { function onWalletMoneyReceived(txId, amount) { // refresh transaction history here currentWallet.refresh() - currentWallet.history.refresh() // this will refresh model + console.log("Confirmed money found") + // history refresh is handled by walletUpdated } function onWalletUnconfirmedMoneyReceived(txId, amount) { @@ -523,6 +525,7 @@ ApplicationWindow { function onWalletMoneySent(txId, amount) { // refresh transaction history here + console.log("money sent found") currentWallet.refresh() currentWallet.history.refresh() // this will refresh model }