From 9a18ecf93dc10ecad9cabd68e9f75a42919c15f7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 27 May 2017 13:02:44 +0300 Subject: [PATCH] Fix the chats list width saving with passcode. Regression was introduced in 0339b1b54b. If the passcode is enabled the main widget is created after the main window was fully initialized, so the first main widget resize already used the shrink algorithm while creating the third column. No we shrink the left column only after the main widget was started. --- Telegram/SourceFiles/mainwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 416d95ffc1..e2190139a4 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -3575,7 +3575,7 @@ void MainWidget::updateWindowAdaptiveLayout() { // dialogs widget to provide a wide enough chat history column. // Don't shrink the column on the first call, when window is inited. if (layout.windowLayout == Adaptive::WindowLayout::Normal - && _controller->window()->positionInited()) { + && _started && _controller->window()->positionInited()) { auto chatWidth = layout.chatWidth; if (_history->willSwitchToTabbedSelectorWithWidth(chatWidth)) { auto thirdColumnWidth = _history->tabbedSelectorSectionWidth();