mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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([=] {
|
) | rpl::filter([=] {
|
||||||
return (_viewportHeight > 0) && (defaultScrollTop() > _visibleTop);
|
return (_viewportHeight > 0) && (defaultScrollTop() > _visibleTop);
|
||||||
}) | rpl::start_with_next([=] {
|
}) | rpl::start_with_next([=] {
|
||||||
|
refreshForDefaultScroll();
|
||||||
jumpToTop();
|
jumpToTop();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
@ -1735,9 +1736,7 @@ void InnerWidget::mousePressReleased(
|
||||||
void InnerWidget::setViewportHeight(int viewportHeight) {
|
void InnerWidget::setViewportHeight(int viewportHeight) {
|
||||||
if (_viewportHeight != viewportHeight) {
|
if (_viewportHeight != viewportHeight) {
|
||||||
_viewportHeight = viewportHeight;
|
_viewportHeight = viewportHeight;
|
||||||
if (height() < defaultScrollTop() + viewportHeight) {
|
refreshForDefaultScroll();
|
||||||
refresh();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2766,6 +2765,12 @@ void InnerWidget::editOpenedFilter() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InnerWidget::refreshForDefaultScroll() {
|
||||||
|
if (height() < defaultScrollTop() + _viewportHeight) {
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InnerWidget::refresh(bool toTop) {
|
void InnerWidget::refresh(bool toTop) {
|
||||||
if (!_geometryInited) {
|
if (!_geometryInited) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -122,6 +122,7 @@ public:
|
||||||
|
|
||||||
void clearFilter();
|
void clearFilter();
|
||||||
void refresh(bool toTop = false);
|
void refresh(bool toTop = false);
|
||||||
|
void refreshForDefaultScroll();
|
||||||
void refreshEmptyLabel();
|
void refreshEmptyLabel();
|
||||||
void resizeEmptyLabel();
|
void resizeEmptyLabel();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue