mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 00:55:12 +00:00
Save window extension on layer->section migration.
If the third section is shown inside the existing window remember it as a zero window extension or third section show. That way it will hide correctly when it is closed by X button. Partially fixes #4091.
This commit is contained in:
@@ -102,6 +102,15 @@ bool LayerWidget::takeToThirdSection() {
|
||||
auto memento = MoveMemento(std::move(_content));
|
||||
localCopy->hideSpecialLayer(anim::type::instant);
|
||||
|
||||
// When creating third section in response to the window
|
||||
// size allowing it to fit without window resize we want
|
||||
// to save that we didn't extend the window while showing
|
||||
// the third section, so that when we close it we won't
|
||||
// shrink the window size.
|
||||
//
|
||||
// See https://github.com/telegramdesktop/tdesktop/issues/4091
|
||||
Auth().data().setThirdSectionExtendedBy(0);
|
||||
|
||||
Auth().data().setThirdSectionInfoEnabled(true);
|
||||
Auth().saveDataDelayed();
|
||||
localCopy->showSection(
|
||||
|
Reference in New Issue
Block a user