mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 22:27:20 +02:00
Fix initial stories collapsing in chats list.
This commit is contained in:
parent
0edbb91b72
commit
cdd4774bb8
2 changed files with 9 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue