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.
This commit is contained in:
John Preston 2017-05-27 13:02:44 +03:00
parent bcd8c87c65
commit 9a18ecf93d

View File

@ -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();