diff --git a/main.qml b/main.qml index 7db130f5..c8f5f67a 100644 --- a/main.qml +++ b/main.qml @@ -1317,8 +1317,6 @@ ApplicationWindow { openWallet("wizard"); } - checkUpdates(); - if(persistentSettings.fiatPriceEnabled){ appWindow.fiatApiRefresh(); appWindow.fiatTimerStart(); @@ -2008,7 +2006,10 @@ ApplicationWindow { Timer { id: updatesTimer - interval: 3600*1000; running: true; repeat: true + interval: 3600 * 1000 + repeat: true + running: !disableCheckUpdatesFlag + triggeredOnStart: true onTriggered: checkUpdates() } diff --git a/src/main/main.cpp b/src/main/main.cpp index 9de20ce4..16d91b0a 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -232,6 +232,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw (i.e. 'gpg -b hashes.txt') generated by another maintainer.", "update-binary"); parser.addOption(verifyUpdateOption); + QCommandLineOption disableCheckUpdatesOption("disable-check-updates", "Disable automatic check for updates."); + parser.addOption(disableCheckUpdatesOption); QCommandLineOption testQmlOption("test-qml"); testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp); parser.addOption(logPathOption); @@ -467,6 +469,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw engine.rootContext()->setContextProperty("homePath", QDir::homePath()); engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath()); engine.rootContext()->setContextProperty("idealThreadCount", QThread::idealThreadCount()); + engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", parser.isSet(disableCheckUpdatesOption)); bool builtWithScanner = false; #ifdef WITH_SCANNER