Auto-refresh Wallet Home & Purchases on 4s timer

This commit is contained in:
Zach Fox 2017-10-23 10:36:23 -07:00
parent 6607be5b58
commit 5c8451a626
2 changed files with 17 additions and 1 deletions

View file

@ -583,9 +583,11 @@ Rectangle {
Timer {
id: inventoryTimer;
interval: 90000;
interval: 4000; // Change this back to 90000 after demo
//interval: 90000;
onTriggered: {
if (root.activeView === "purchasesMain" && !root.pendingInventoryReply) {
console.log("Refreshing Purchases...");
root.pendingInventoryReply = true;
commerce.inventory();
}

View file

@ -43,6 +43,7 @@ Item {
calculatePendingAndInvalidated();
}
refreshTimer.start();
}
}
@ -117,6 +118,8 @@ Item {
historyReceived = false;
commerce.balance();
commerce.history();
} else {
refreshTimer.stop();
}
}
}
@ -138,6 +141,17 @@ Item {
}
}
Timer {
id: refreshTimer;
interval: 4000; // Remove this after demo?
onTriggered: {
console.log("Refreshing Wallet Home...");
historyReceived = false;
commerce.balance();
commerce.history();
}
}
// Recent Activity
Rectangle {
id: recentActivityContainer;