2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Apply local / server comment updates together.

This commit is contained in:
John Preston
2021-07-20 12:13:32 +03:00
parent c789349b24
commit 773912f586
5 changed files with 30 additions and 37 deletions

View File

@@ -4895,6 +4895,10 @@ void HistoryWidget::revealItemsCallback() {
if (_itemsRevealHeight != height) {
const auto wasScrollTop = _scroll->scrollTop();
const auto wasAtBottom = (wasScrollTop == _scroll->scrollTopMax());
if (!wasAtBottom) {
height = 0;
_itemRevealAnimations.clear();
}
_itemsRevealHeight = height;
_list->changeItemsRevealHeight(_itemsRevealHeight);
@@ -4920,7 +4924,7 @@ void HistoryWidget::startItemRevealAnimations() {
[=] { revealItemsCallback(); },
0.,
1.,
HistoryView::kItemRevealDuration,
HistoryView::ListWidget::kItemRevealDuration,
anim::easeOutCirc);
}
}