mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-01 12:44:31 +00:00
Fix initial stories collapsing in chats list.
This commit is contained in:
parent
0edbb91b72
commit
cdd4774bb8
@ -328,6 +328,7 @@ InnerWidget::InnerWidget(
|
||||
) | rpl::filter([=] {
|
||||
return (_viewportHeight > 0) && (defaultScrollTop() > _visibleTop);
|
||||
}) | rpl::start_with_next([=] {
|
||||
refreshForDefaultScroll();
|
||||
jumpToTop();
|
||||
}, lifetime());
|
||||
|
||||
@ -1735,9 +1736,7 @@ void InnerWidget::mousePressReleased(
|
||||
void InnerWidget::setViewportHeight(int viewportHeight) {
|
||||
if (_viewportHeight != viewportHeight) {
|
||||
_viewportHeight = viewportHeight;
|
||||
if (height() < defaultScrollTop() + viewportHeight) {
|
||||
refresh();
|
||||
}
|
||||
refreshForDefaultScroll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2766,6 +2765,12 @@ void InnerWidget::editOpenedFilter() {
|
||||
}
|
||||
}
|
||||
|
||||
void InnerWidget::refreshForDefaultScroll() {
|
||||
if (height() < defaultScrollTop() + _viewportHeight) {
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void InnerWidget::refresh(bool toTop) {
|
||||
if (!_geometryInited) {
|
||||
return;
|
||||
|
@ -122,6 +122,7 @@ public:
|
||||
|
||||
void clearFilter();
|
||||
void refresh(bool toTop = false);
|
||||
void refreshForDefaultScroll();
|
||||
void refreshEmptyLabel();
|
||||
void resizeEmptyLabel();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user