From f881192dd08cc399ceebc202bdb57ebb7ca4e006 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 3 Oct 2023 20:26:24 +0400 Subject: [PATCH] Don't enter settings after update --- Telegram/SourceFiles/platform/linux/launcher_linux.cpp | 9 +++++++-- Telegram/SourceFiles/platform/linux/launcher_linux.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp index 1e21f57fc..55236a156 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp @@ -43,6 +43,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { } const auto justRelaunch = action == UpdaterLaunch::JustRelaunch; + if (action == UpdaterLaunch::PerformUpdate) { + _updating = true; + } std::vector argumentsList; @@ -82,8 +85,10 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { argumentsList.push_back("-key"); argumentsList.push_back(cDataFile().toStdString()); } - argumentsList.push_back("-noupdate"); - argumentsList.push_back("-tosettings"); + if (!_updating) { + argumentsList.push_back("-noupdate"); + argumentsList.push_back("-tosettings"); + } if (customWorkingDir()) { argumentsList.push_back("-workdir"); argumentsList.push_back(cWorkingDir().toStdString()); diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.h b/Telegram/SourceFiles/platform/linux/launcher_linux.h index e0a45af0f..6c8f28e91 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.h +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.h @@ -21,6 +21,8 @@ private: void initHook() override; bool launchUpdater(UpdaterLaunch action) override; + bool _updating = false; + }; } // namespace Platform