Fixed dialogs up button when column of dialogs is small.

This commit is contained in:
23rd 2019-04-05 23:42:10 +03:00 committed by John Preston
parent 14de1fe485
commit be89a0bf7e
1 changed files with 3 additions and 1 deletions

View File

@ -275,6 +275,8 @@ void DialogsWidget::updateScrollUpVisibility() {
} }
void DialogsWidget::startScrollUpButtonAnimation(bool shown) { void DialogsWidget::startScrollUpButtonAnimation(bool shown) {
const auto smallColumn = (width() < st::columnMinimalWidthLeft);
shown &= !smallColumn;
if (_scrollToTopIsShown == shown) { if (_scrollToTopIsShown == shown) {
return; return;
} }
@ -283,7 +285,7 @@ void DialogsWidget::startScrollUpButtonAnimation(bool shown) {
[=] { updateScrollUpPosition(); }, [=] { updateScrollUpPosition(); },
_scrollToTopIsShown ? 0. : 1., _scrollToTopIsShown ? 0. : 1.,
_scrollToTopIsShown ? 1. : 0., _scrollToTopIsShown ? 1. : 0.,
st::historyToDownDuration); smallColumn ? 0 : st::historyToDownDuration);
} }
void DialogsWidget::updateScrollUpPosition() { void DialogsWidget::updateScrollUpPosition() {