From 7d8ba662113dbb200e6310bc04560e44d7ae88ea Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 11 Sep 2018 21:47:37 +0300 Subject: [PATCH] Core::UpdateApplication using new settings. --- Telegram/SourceFiles/core/update_checker.cpp | 25 +++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp index c72383f2e6..e2bfcb69ff 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -16,7 +16,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "mtproto/session.h" #include "mainwindow.h" #include "core/click_handler_types.h" -#include "old_settings/settings_widget.h" +#include "info/info_memento.h" +#include "info/settings/info_settings_widget.h" +#include "window/window_controller.h" +#include "settings/settings_intro.h" extern "C" { #include @@ -2124,18 +2127,22 @@ void UpdateApplication() { }(); UrlClickHandler::Open(url); } else { - cSetLastUpdateCheck(0); - Core::UpdateChecker().start(); if (const auto window = App::wnd()) { - // #TODO settings - auto settings = Box(); - const auto weak = make_weak(settings.data()); - window->showSpecialLayer(std::move(settings), anim::type::normal); - if (weak) { - weak->scrollToUpdateRow(); + if (const auto controller = window->controller()) { + controller->showSection( + Info::Memento( + Info::Settings::Tag{ Auth().user() }, + Info::Section::SettingsType::General), + Window::SectionShow()); + } else { + window->showSpecialLayer( + Box(), + anim::type::normal); } window->showFromTray(); } + cSetLastUpdateCheck(0); + Core::UpdateChecker().start(); } }