From f1ab712f077ec73c42812995056b48c7f9a16ec8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 11 Aug 2023 20:22:50 +0200 Subject: [PATCH] Fix outdated bar closing. --- Telegram/SourceFiles/ui/controls/window_outdated_bar.cpp | 3 +++ Telegram/SourceFiles/window/main_window.cpp | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/ui/controls/window_outdated_bar.cpp b/Telegram/SourceFiles/ui/controls/window_outdated_bar.cpp index 538e3fcda..2ad527ce2 100644 --- a/Telegram/SourceFiles/ui/controls/window_outdated_bar.cpp +++ b/Telegram/SourceFiles/ui/controls/window_outdated_bar.cpp @@ -174,6 +174,9 @@ object_ptr CreateOutdatedBar( Closed(workingPath); }, wrap->lifetime()); + wrap->entity()->resizeToWidth(st::windowMinWidth); + wrap->show(anim::type::instant); + return result; #else // DESKTOP_APP_SPECIAL_TARGET return { nullptr }; diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 07c2d8a4d..c1d17fa74 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -375,9 +375,7 @@ MainWindow::MainWindow(not_null controller) if (_outdated) { _outdated->heightValue( - ) | rpl::filter([=] { - return window()->windowHandle() != nullptr; - }) | rpl::start_with_next([=](int height) { + ) | rpl::start_with_next([=](int height) { if (!height) { crl::on_main(this, [=] { _outdated.destroy(); }); }