2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Add '-externalupdater' command-line argument.

Now no-autoupdater mode can be switched on in runtime.
Also TDESKTOP_DISABLE_AUTOUPDATE build is disabled in CI (trivial).

Fixes #4895.
This commit is contained in:
John Preston
2018-07-12 01:14:44 +03:00
parent e2bc6990c7
commit 52e7ddf079
29 changed files with 449 additions and 420 deletions

View File

@@ -1623,11 +1623,9 @@ namespace App {
}
void restart() {
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
bool updateReady = (Core::UpdateChecker().state() == Core::UpdateChecker::State::Ready);
#else // !TDESKTOP_DISABLE_AUTOUPDATE
bool updateReady = false;
#endif // else for !TDESKTOP_DISABLE_AUTOUPDATE
using namespace Core;
const auto updateReady = !UpdaterDisabled()
&& (UpdateChecker().state() == UpdateChecker::State::Ready);
if (updateReady) {
cSetRestartingUpdate(true);
} else {