2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Fix crash in lottie animation destroy-on-init.

This commit is contained in:
John Preston
2020-03-06 15:07:24 +04:00
parent 14aa455164
commit 07eab8555a
2 changed files with 4 additions and 2 deletions

View File

@@ -5106,6 +5106,8 @@ int HistoryWidget::countInitialScrollTop() {
}
void HistoryWidget::createUnreadBarIfBelowVisibleArea(int withScrollTop) {
Expects(_history != nullptr);
if (_history->unreadBar()) {
return;
}
@@ -5227,7 +5229,7 @@ void HistoryWidget::updateHistoryGeometry(
newScrollTop = countInitialScrollTop();
_historyInited = true;
_scrollToAnimation.stop();
} else if (wasAtBottom && !loadedDown) {
} else if (wasAtBottom && !loadedDown && !_history->unreadBar()) {
newScrollTop = countAutomaticScrollTop();
} else {
newScrollTop = std::min(