Don't toggle tabbed section from OneColumn.

This commit is contained in:
John Preston 2017-09-19 22:16:52 +03:00
parent 26532ab9b4
commit 48cbdd9d40
2 changed files with 5 additions and 2 deletions

View File

@ -3784,7 +3784,8 @@ void HistoryWidget::pushInfoToThirdSection() {
void HistoryWidget::toggleTabbedSelectorMode() {
if (_tabbedPanel) {
if (controller()->canShowThirdSection()) {
if (controller()->canShowThirdSection()
&& !Adaptive::OneColumn()) {
Auth().data().setTabbedSelectorSectionEnabled(true);
Auth().saveDataDelayed(kSaveTabbedSelectorSectionTimeoutMs);
pushTabbedSelectorToThirdSection();

View File

@ -162,7 +162,9 @@ void Controller::resizeForThirdSection() {
Auth().data().setTabbedSelectorSectionEnabled(false);
Auth().data().setThirdSectionInfoEnabled(false);
auto extendBy = st::columnMinimalWidthThird;
auto extendBy = qMax(
minimalThreeColumnWidth() - layout.bodyWidth,
st::columnMinimalWidthThird);
auto newBodyWidth = layout.bodyWidth + extendBy;
dialogsWidthRatio().set(
(dialogsWidthRatio().value() * layout.bodyWidth) / newBodyWidth,