mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix glitch on layer open.
This commit is contained in:
parent
3600055424
commit
d59ed7b14c
1 changed files with 5 additions and 0 deletions
|
@ -105,10 +105,15 @@ void LayerWidget::setupHeightConsumers() {
|
||||||
// New content arrived.
|
// New content arrived.
|
||||||
_heightAnimated = _heightAnimation.animating();
|
_heightAnimated = _heightAnimation.animating();
|
||||||
return;
|
return;
|
||||||
|
} else if (height < _desiredHeight
|
||||||
|
&& height < st::columnMinimalWidthMain) {
|
||||||
|
// Don't animate layer height to a very small one.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
std::swap(_desiredHeight, height);
|
std::swap(_desiredHeight, height);
|
||||||
if (!height
|
if (!height
|
||||||
|| (_heightAnimated && !_heightAnimation.animating())) {
|
|| (_heightAnimated && !_heightAnimation.animating())) {
|
||||||
|
_heightAnimated = true;
|
||||||
setContentHeight(_desiredHeight);
|
setContentHeight(_desiredHeight);
|
||||||
} else {
|
} else {
|
||||||
_heightAnimated = true;
|
_heightAnimated = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue