Fix glitch on layer open.

This commit is contained in:
John Preston 2022-04-14 17:29:40 +04:00
parent 3600055424
commit d59ed7b14c

View file

@ -105,10 +105,15 @@ void LayerWidget::setupHeightConsumers() {
// New content arrived.
_heightAnimated = _heightAnimation.animating();
return;
} else if (height < _desiredHeight
&& height < st::columnMinimalWidthMain) {
// Don't animate layer height to a very small one.
return;
}
std::swap(_desiredHeight, height);
if (!height
|| (_heightAnimated && !_heightAnimation.animating())) {
_heightAnimated = true;
setContentHeight(_desiredHeight);
} else {
_heightAnimated = true;