2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Show third column only when explicitly requested.

This allows you to show info in layer from mention links.
This commit is contained in:
John Preston
2017-12-04 11:33:33 +04:00
parent 629c216a7f
commit e1c68892d4
23 changed files with 184 additions and 120 deletions

View File

@@ -2604,10 +2604,14 @@ void MainWidget::showSection(
&memento,
params)) {
return;
} else if (_thirdSection && _thirdSection->showInternal(
&memento,
params)) {
return;
//
// Now third section handles only its own showSection() requests.
// General showSection() should show layer or main_section instead.
//
//} else if (_thirdSection && _thirdSection->showInternal(
// &memento,
// params)) {
// return;
}
// If the window was not resized, but we've enabled
@@ -2762,7 +2766,7 @@ void MainWidget::showNewSection(
thirdSectionTop,
st::columnMinimalWidthThird,
height() - thirdSectionTop);
auto newThirdSection = Adaptive::ThreeColumn()
auto newThirdSection = (Adaptive::ThreeColumn() && params.thirdColumn)
? memento.createWidget(
this,
_controller,
@@ -3522,7 +3526,7 @@ void MainWidget::updateThirdColumnToCurrentPeer(
_controller->showSection(
std::move(*thirdSectionForCurrentMainSection(peer)),
params);
params.withThirdColumn());
};
auto switchTabbedFast = [&] {
saveOldThirdSection();