check updates async

This commit is contained in:
Jaquee
2017-08-06 00:10:59 +02:00
parent c68c317776
commit 3f7e3ba3c4
3 changed files with 26 additions and 2 deletions

View File

@@ -821,6 +821,7 @@ ApplicationWindow {
//
walletManager.walletOpened.connect(onWalletOpened);
walletManager.walletClosed.connect(onWalletClosed);
walletManager.checkUpdatesComplete.connect(onWalletCheckUpdatesComplete);
if(typeof daemonManager != "undefined") {
daemonManager.daemonStarted.connect(onDaemonStarted);
@@ -1341,8 +1342,7 @@ ApplicationWindow {
Qt.quit();
}
function checkUpdates() {
var update = walletManager.checkUpdates("monero-gui", "gui")
function onWalletCheckUpdatesComplete(update) {
if (update === "")
return
print("Update found: " + update)
@@ -1360,6 +1360,10 @@ ApplicationWindow {
}
}
function checkUpdates() {
walletManager.checkUpdatesAsync("monero-gui", "gui")
}
Timer {
id: updatesTimer
interval: 3600*1000; running: true; repeat: true