Merge pull request #808

3f7e3ba check updates async (Jaquee)
This commit is contained in:
Riccardo Spagni
2017-08-23 21:23:13 +02:00
3 changed files with 26 additions and 2 deletions

View File

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