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

View File

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